-------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final
>  Submission\Replication Files\AuthoritarianFDI.log
  log type:  text
 opened on:  21 Nov 2017, 12:44:55

. 
. clear all

. set more off

. set scheme lean2

. global dir ="C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Fin
> al Submission\Replication Files"

. global m = 10                                                                
>    /* number of imputated data sets, estimates to average */

. 
. capture program drop jwmi

. program define jwmi
  1.         matrix c = J(1,$m,1)                                              
>       /* matrix for obtaining columns sums */         
  2.                 * Get and store the estimates *
.         matrix est = J($m,2,.)                                               
>    /* place to store estimates */
  3.         forval i = 1/10{
  4.                 qui:est restore $imp`i'                                   
>       /* get estimate */
  5.                 qui:nlcom _b[$v],post
  6.                 matrix beta =e(b)
  7.                 matrix var = e(V)
  8.                 matrix est[`i',1]==beta[1,1]
  9.                 matrix est[`i',2]==var[1,1]
 10.         }
 11.         matrix colnames est = beta var
 12.         *matrix list est                                                  
>                       /* show the estimates from tests for each imputed data 
> set */
.                 * Estimate of beta is the mean *
.         matrix mean_b = (c*est)/$m                                           
>    /* calculate the mean of b */
 13.         * Between variance, Vb *
.         matrix cvb = J($m,1,.)
 14.         forval i = 1/$m {
 15.                 matrix x ==est[`i',1]                                     
>       /* get the x_i's  */
 16.                 matrix cvb[`i',1]==(x[1,1]- mean_b[1,1])^2  /* squared dev
> iations from mean */
 17.         }
 18.         matrix  vb = (c*cvb)/($m-1)                                     /*
>  sum squares and divide by n-1 */
 19.                 * Within variance, Vw *
.         matrix vw = mean_b[1,2]
 20.                 *  Total variance *
.         matrix tv = vw[1,1] + vb[1,1] + (vb[1,1]/$m)
 21.                 * Show the MI beta & se *
.         matrix beta= mean_b[1,1]
 22.         matrix se = sqrt(tv[1,1]) 
 23.         matrix list beta
 24.         matrix list se
 25.                 * Store results for graphing
.         replace b = beta[1,1] if count==$count
 26.         replace se = se[1,1] if count==$count
 27.         replace hi =  beta[1,1] + 1.96*se[1,1] if count==$count
 28.         replace lo =  beta[1,1] - 1.96*se[1,1] if count==$count
 29.         replace mhi =  beta[1,1] + 1.65*se[1,1] if count==$count
 30.         replace mlo =  beta[1,1] - 1.65*se[1,1] if count==$count
 31.         replace model = "$imp" if count==$count
 32.         global count=$count -1
 33. end

. 
. 
.                 ************************************
.                 *** Figure 1: Expropriation Plot ***
.                 ************************************
. 
.                         cd "$dir"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files

.                         use GWF-All-Political-Regimes, clear

.                         sort cow year

.                         merge cow year using expropriations
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: variable cowcode was int, now float to accommodate using data's
       values)

.                         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      7,628       95.57       95.57
          2 |         29        0.36       95.93
          3 |        325        4.07      100.00
------------+-----------------------------------
      Total |      7,982      100.00

.                          * expropriations in small countries not in GWF and p
> rior to GWF independence *
.                         list cow expropriations_country year if _merge==2 & y
> ear>1946, clean

        cowcode   expropriations_co~y   year  
7954.        51               Jamaica   1967  
7955.        51               Jamaica   1972  
7956.        51               Jamaica   1974  
7957.        51               Jamaica   1975  
7958.        51               Jamaica   1977  
7959.        52   Trinidad and Tobago   1969  
7960.        52   Trinidad and Tobago   1971  
7961.        52   Trinidad and Tobago   1972  
7962.        52   Trinidad and Tobago   1974  
7963.        52   Trinidad and Tobago   1975  
7964.        52   Trinidad and Tobago   1977  
7965.        52   Trinidad and Tobago   1981  
7966.        58   Antigua and Barbuda   1975  
7967.        58   Antigua and Barbuda   2002  
7968.       110                Guyana   1970  
7969.       110                Guyana   1975  
7970.       110                Guyana   1976  
7971.       110                Guyana   1977  
7972.       115              Suriname   1974  
7974.       540                Angola   1975  
7975.       541            Mozambique   1975  
7976.       551                Zambia   1964  
7977.       615               Algeria   1962  
7979.       692               Bahrain   1974  
7980.       692               Bahrain   1979  
7981.       694                 Qatar   1972  
7982.       771            Bangladesh   1971  

.                         drop if _merge==2
(29 observations deleted)

.                         drop _merge

.                         * drop countries not coded as democracy or autocracy 
> *
.                         drop if gwf_duration==. | gwf_nonautocracy == "foreig
> n-occupied" | gwf_non=="warlord/foreign-occupied"
(60 observations deleted)

. 
.                         *** by dictatorship/democracy ***
.                         egen x_yrexp = sum(allexp) if gwf_non=="NA", by(year)
(3302 missing values generated)

.                         egen y_yrexp = sum(allexp) if gwf_non~="NA", by(year)
(4591 missing values generated)

.                         egen dict_yr = max(x_), by(year)

.                         egen dem_yr = max(y_), by(year)

.                         egen tag  = tag(year)  

.                         drop if year<1960 | year>2006
(1,713 observations deleted)

.                         twoway (bar dict_yr year if tag==1,color(gs12) ylab(,
> glcolor(gs14)) xlab(1960 (10) 2000) /*
>                         */ xtitle(Year, height(6)) ytitle(Number of expropria
> tions))  /*
>                         */ (line dem_yr year if tag==1, legend(lab(1 "Dictato
> rship") lab(2 "Democracy") /*
>                         */ col(1) pos(3) ring(0)) scheme(lean2) title(By regi
> me) saving(h1,replace))
(file h1.gph saved)

.                         drop x_ y_ dict dem tag

. 
.                         *** by primary/non-primary ***
.                         egen x_yrexp = sum(pexp), by(year)

.                         egen y_yrexp = sum(npexp), by(year)

.                         egen p_yr = max(x_), by(year)

.                         egen np_yr = max(y_), by(year)

.                         egen tag  = tag(year)  

.                         drop if year<1960 | year>2006
(0 observations deleted)

.                         twoway (bar p_yr year if tag==1,color(gs12) ylab(,glc
> olor(gs14)) xlab(1960 (10) 2000) /*
>                         */ xtitle(Year, height(6)) ytitle(Number of expropria
> tions))  /*
>                         */ (line np_yr year if tag==1, legend(lab(1 "Primary 
> sector") lab(2 "Other sectors") /*
>                         */ col(1) pos(3) ring(0)) scheme(lean2) title(By sect
> or) saving(h2,replace))
(file h2.gph saved)

.                         drop x_ y_ p_ np_ tag

. 
.                         graph combine h1.gph h2.gph, col(2) xsize(3) ysize(1.
> 4) scheme(lean2) b1()

.                         graph export "$dir\golden\Expropriations.pdf", as(pdf
> ) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Expropriations.pdf written in PDF format)

.                         graph export "$dir\golden\ISQ-Figure-1.png", as(png) 
> replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-1.png written in PNG format)

.                         erase h1.gph

.                         erase h2.gph

. 
.                         *** List expropriations between 1980 and 1998, inclus
> ive
.                         list gwf_case  year sector gwf_personal gwf_mil gwf_p
> arty if pexp==1 & year>1979 & year<1999, clean noobs               

          gwf_casename   year   sector   gwf_pe~l   gwf_mi~y   gwf_pa~y  
        Honduras 81-NA   1983      AGR          0          0          0  
     El Salvador 48-82   1980      AGR          0          0          1  
       Nicaragua 79-90   1980      AGR          0          0          1  
       Nicaragua 79-90   1982      AGR          0          0          1  
            Peru 80-92   1985      PET          0          0          0  
     Congo/Zaire 97-NA   1998      MIN          1          0          0  
          Zambia 67-91   1980      PET          0          0          1  
         Lesotho 86-93   1992      MIN          0          1          0  
    Turkmenistan 91-NA   1996      PET          0          0          1  
      Kazakhstan 91-NA   1992      PET          1          0          0  
        Pakistan 77-88   1983      AGR          0          1          0  
       Sri Lanka 78-94   1981      AGR          0          0          1  

.                         /*                                                   
>      SECTOR        PERSONAL        MILITARY        PARTY
>                                 Honduras 81-NA   1983      AGR          0    
>       0          0  
>                          El Salvador 48-82   1980      AGR          0        
>   0          1  
>                            Nicaragua 79-90   1980      AGR          0        
>   0          1  
>                            Nicaragua 79-90   1982      AGR          0        
>   0          1  
>                                         Peru 80-92   1985      PET          0
>           0          0  
>                          Congo/Zaire 97-NA   1998      MIN          1        
>   0          0  
>                                   Zambia 67-91   1980      PET          0    
>       0          1  
>                                  Lesotho 86-93   1992      MIN          0    
>       1          0  
>                         Turkmenistan 91-NA   1996      PET          0        
>   0          1  
>                           Kazakhstan 91-NA   1992      PET          1        
>   0          0  
>                                 Pakistan 77-88   1983      AGR          0    
>       1          0  
>                            Sri Lanka 78-94   1981      AGR          0        
>   0          1   */
. 
.         ****************************
.         *** Merge and clean data ***
.         ****************************
.         cd "$dir"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files

.         set scheme s1mono //lean1

.         global color1="gs1"

.         global color2="gs8"

.         global color3="gs12"

.         
.         ** Oil reserve data **
.         use haber-menaldo, clear

.         drop if year<1946
(8,312 observations deleted)

.         recode cow (679=678) (818=816)
(cowcode: 126 changes made)

.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1946 to 2008
                delta:  1 unit

.         gen oil = ln(1+l.total_oil_income_pc)
(925 missing values generated)

.         gen l5reserves= ln(1+((l5.reserves_billions*1000000000)/l5.population
> ))
(1,813 missing values generated)

.         gen l1reserves= ln(1+((l1.reserves_billions*1000000000)/l1.population
> ))
(1,270 missing values generated)

.         forval i = 6/10 {
  2.                 replace l5reserves = ln(1+((l`i'.reserves_billions*1000000
> 000)/l`i'.population)) if l5res==.
  3.         }
(83 real changes made)
(22 real changes made)
(9 real changes made)
(8 real changes made)
(7 real changes made)

.         bysort cow: egen minyr  = min(year) if l5reserves~=.
(1684 missing values generated)

.         gen first = l5reserves if minyr==year
(8,731 missing values generated)

.         bysort cow: egen firstreserves = max(first)
(84 missing values generated)

.         gen minyr80 = minyr
(1,684 missing values generated)

.         replace minyr80 = 1980 if minyr80<1980
(6,873 real changes made)

.         egen meanfirst = mean(l5res) if year<=minyr80, by(cow)
(4083 missing values generated)

.         egen meanreserves =max(meanfirst), by(cow)  /* pre-1980 -- or first y
> ear -- mean reserves */
(84 missing values generated)

.         drop first minyr* meanfirst

.         sum year first*

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        year |      8,894     1978.96    17.84701       1946       2008
firstreser~s |      8,810    1.030573    2.205148          0   11.49969

.         sort cow year 

.         save hm_merge, replace
(note: file hm_merge.dta not found)
file hm_merge.dta saved

.         
.         ** FDI data **
.         use authoritarianism-fdi, clear

.         rename ccode cowcode 

.         drop if cow==.
(2,225 observations deleted)

.         sort cow year

.         joinby cow year using hm_merge,unmatched(both)

.         *drop if year<1980|year>2008
.         tab _merge 

                       _merge |      Freq.     Percent        Cum.
------------------------------+-----------------------------------
          only in master data |      3,526       28.39       28.39
           only in using data |      1,619       13.04       41.43
both in master and using data |      7,275       58.57      100.00
------------------------------+-----------------------------------
                        Total |     12,420      100.00

.         drop if _merge==2
(1,619 observations deleted)

.         rename _merge merge2

.         erase hm_merge.dta

.         egen x = max(meanres), by(cow)
(1999 missing values generated)

.         replace meanres = x if meanres==.
(1,611 real changes made)

.         drop x

. 
.         **  Trade concentration data **
.         joinby country year using trade-concentration.dta,unmatched(both)

.         drop if _merge==2
(2,332 observations deleted)

.         drop _merge

.         sort cow year

.         save temp, replace
file temp.dta saved

.         
.         *** Expropriation data ***
.         merge cow year using expropriations
(note: you are using old merge syntax; see [D] merge for new syntax)

.         tab _merge if year>=1980

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      6,717       98.78       98.78
          3 |         83        1.22      100.00
------------+-----------------------------------
      Total |      6,800      100.00

.         sort cow year

.         recode allexp pexp npexp (.=0)
(allexp: 10449 changes made)
(pexp: 10449 changes made)
(npexp: 10449 changes made)

.         local var = "allexp pexp npexp"

.         foreach v of local var {
  2.                 gen original_`v'=`v'
  3.                 tsset cow year
  4.                 egen x_`v' = filter(`v'), coef(1 0.5 0.25 0.125 0.0625 0.0
> 3125 0.015625 0.0078125) lags(1/8) 
  5.                 replace `v' = x_`v'  if x_`v'~=.
  6.                 drop x_`v'
  7.                 tsset cow year
  8.                 egen x_`v' = filter(`v'), coef(1 0.5 0.25 0.125 0.0625 0.0
> 3125) lags(1/6) 
  9.                 gen `v'6 = x_`v'  if x_`v'~=.
 10.                 drop x_`v'
 11.                 tsset cow year
 12.                 egen x_`v' = filter(`v'), coef(1 0.5 0.25 0.125 0.0625 0.0
> 3125 .015625 0.0078125 0.003906 .001953) lags(1/10) 
 13.                 gen `v'10 = x_`v'  if x_`v'~=.
 14.                 drop x_`v'
 15.         }
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit
(1612 missing values generated)
(1,525 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit
(1210 missing values generated)
(1,210 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit
(2014 missing values generated)
(2,014 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit
(1612 missing values generated)
(1,033 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit
(1210 missing values generated)
(1,210 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit
(2014 missing values generated)
(2,014 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit
(1612 missing values generated)
(1,061 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit
(1210 missing values generated)
(1,210 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit
(2014 missing values generated)
(2,014 missing values generated)

.         *drop if year<1980
.         sort year

.         drop _merge

.         save temp, replace
file temp.dta saved

.         
.         *** Merge oil price data ***
.         use ross-oil, clear

.         egen tag = tag(year)

.         keep if tag==1
(14,432 observations deleted)

.         keep year oil_price*

.         sort year

.         merge year using temp
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: variable year was int, now float to accommodate using data's values)
variable year does not uniquely identify observations in temp.dta

.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit

.         gen oilpc = ln(1+l.oil_gas_valuePOP_2000)
(2,750 missing values generated)

.         gen oil5pc = ln(1+l5.oil_gas_valuePOP_2000)
(3,260 missing values generated)

.         sort cow year

.         drop _merge

.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2013, but with gaps
                delta:  1 unit

.         save temp, replace
file temp.dta saved

. 
.         *** POLCON ***
.         import excel polcon,  firstrow clear    

.         keep if year>1959
(8,369 observations deleted)

.         keep ccode year *_country polcon* j f

.         rename ccode cowcode

.         gen polcon = polconv
(1,064 missing values generated)

.         replace polcon = polconiii if polcon==.
(880 real changes made)

.         recode cowcode (678=679) (529=530)  (818=816)
(cowcode: 94 changes made)

.         sort cowcode year

.         tsset cowcode year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1960 to 2016, but with a gap
                delta:  1 unit

.         gen lpolcon = l.polcon
(381 missing values generated)

.         sort cow year

.         merge cow year using temp
(note: you are using old merge syntax; see [D] merge for new syntax)
variables cowcode year do not uniquely identify observations in the master
    data
(note: variable year was int, now float to accommodate using data's values)
(note: variable cowcode was int, now float to accommodate using data's
       values)

.         drop _merge

.         sort cow year

.         save temp,replace
file temp.dta saved

. 
.         *** Log transformations for explanatory variables ***
.         use temp,clear

.         gen lgdpcap=log(cgdpcap)
(3,581 missing values generated)

.         gen lgdp=log(cgdp)
(3,571 missing values generated)

.         gen lpop=log(pop)
(1,130 missing values generated)

.         gen lopenness=log(1+openness)
(3,937 missing values generated)

.         hist lopen if gwf_pers~=., bin(50) 
(bin=50, start=.26911294, width=.11638306)

.         recode fdi_transition (.=0) if year<1989
(fdi_transition: 5902 changes made)

.         gen ldevelopingfdi=log(fdi_developing+fdi_transition)
(2,689 missing values generated)

.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1900 to 2016, but with gaps
                delta:  1 unit

.         gen grow = l.growth
(3,615 missing values generated)

.         
.         *** Real FDI (PPP adjusted)
.         gen rpfdi=rgdpo*1000000/GDP*ISICPrimary
(10,322 missing values generated)

.         gen rsfdi=rgdpo*1000000/GDP*ISICSecondary
(10,322 missing values generated)

.         gen rtfdi=rgdpo*1000000/GDP*ISICTertiary
(10,322 missing values generated)

.         
.         *** FDI, share of GDP ***
.         gen Primaryfdigdp = ISICPrimary/(GDP/1000000)
(10,310 missing values generated)

.         gen Secondaryfdigdp = ISICSecondary/(GDP/1000000)
(10,310 missing values generated)

.         gen Tertiaryfdigdp = ISICTertiary/(GDP/1000000)
(10,310 missing values generated)

. 
. 
.         *** Log transformations for sectoral FDI data from Real FDI as a shar
> e of GDP ***
.         local var = "Primary Secondary Tertiary"

.         foreach v of local var {
  2.                 gen log_`v'fdigdp = ln(1+abs(100*`v'fdigdp))
  3.                 replace log_`v'fdigdp = -1*log_`v'fdigdp if ISIC`v'<0
  4.                 hist log_`v'fdigdp if gwf_pers~=., bin(50)
  5.         }
(10,310 missing values generated)
(71 real changes made)
(bin=50, start=-1.1446333, width=.10035629)
(10,310 missing values generated)
(41 real changes made)
(bin=50, start=-.66780901, width=.06089312)
(10,310 missing values generated)
(23 real changes made)
(bin=50, start=-.72644883, width=.07331854)

.         pwcorr  log_Primaryfdigdp log_Secondaryfdigdp log_Tertiaryfdigdp, sig

             | log_Pr~p log_Se~p log_Te~p
-------------+---------------------------
log_Primar~p |   1.0000 
             |
             |
log_Second~p |  -0.0230   1.0000 
             |   0.4294
             |
log_Tertia~p |   0.0110   0.3412   1.0000 
             |   0.7046   0.0000
             |

.         
.         *** Cube transformations for sectoral FDI data from Real FDI as a sha
> re of GDP ***
.         local var = "Primary Secondary Tertiary"

.         foreach v of local var {
  2.                 gen cub_`v'fdigdp = (abs(`v'fdigdp))^(1/3)
  3.                 replace cub_`v'fdigdp = -1*cub_`v'fdigdp if ISIC`v'<0
  4.                 hist cub_`v'fdigdp if gwf_pers~=., bin(50)
  5.         }
(10,310 missing values generated)
(71 real changes made)
(bin=50, start=-.27768886, width=.02111422)
(10,310 missing values generated)
(41 real changes made)
(bin=50, start=-.21178822, width=.0134475)
(10,310 missing values generated)
(23 real changes made)
(bin=50, start=-.22020124, width=.01567676)

.         pwcorr  cub_Primaryfdigdp cub_Secondaryfdigdp cub_Tertiaryfdigdp, sig

             | cub_Pr~p cub_Se~p cub_Te~p
-------------+---------------------------
cub_Primar~p |   1.0000 
             |
             |
cub_Second~p |   0.0001   1.0000 
             |   0.9978
             |
cub_Tertia~p |  -0.0090   0.3228   1.0000 
             |   0.7561   0.0000
             |

. 
.         *** Gen region dummies ***
.         gen meast = cow>=600 & cow<700

.         gen americas = cow<200

.         gen ssa = cow>=400 & cow<600

.         gen asia = cow>=700 & cow<800

.         gen easia = cow>=800

. 
.         *** Gen civil war variable ***
.         gen civilwar=incidencev413
(3,221 missing values generated)

.         replace civilwar=0 if maxintyearv413<2
(900 real changes made)

.         keep if gwf_country~=""
(4,717 observations deleted)

.         
.         *** Merge personalism data ***
.         sort cow year

.         merge cow year using GWF
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: variable gwf_prior was str24, now str26 to accommodate using data's
       values)

.         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      2,891       38.64       38.64
          2 |        704        9.41       48.05
          3 |      3,887       51.95      100.00
------------+-----------------------------------
      Total |      7,482      100.00

.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1946 to 2010, but with gaps
                delta:  1 unit

. 
.         *** Create personalism index using Sample 2 observations ***
.         gen allregime = 1 if gwf_non=="democracy" | gwf_non=="provisional"
(4,766 missing values generated)

.         replace allregime = 2 if gwf_mil==1
(527 real changes made)

.         replace allregime = 3 if gwf_monarchy==1
(447 real changes made)

.         replace allregime = 4 if gwf_party==1
(1,933 real changes made)

.         replace allregime = 5 if gwf_personal==1
(1,031 real changes made)

.         sort gwf_leaderid year

.         gen newparty = (partyhistory_post & support==1 & gwf_leaderid == gwf_
> leaderid[_n-1]) | (partyhistory_priordem & support==1) if support~=.
(2,891 missing values generated)

.         recode newparty officepers partyhistory_post partyhistory_priordem le
> aderrel ldr_exp* (.=0) if allregime~=.     /* set democracies equal to zero o
> n personalism scale */ 
(newparty: 2767 changes made)
(officepers: 2767 changes made)
(partyhistory_postseizure: 2767 changes made)
(partyhistory_priordem: 2767 changes made)
(leaderrelatvs: 2767 changes made)
(ldr_exp_highrank: 2767 changes made)
(ldr_exp_lowrank: 2767 changes made)
(ldr_exp_rebel: 2767 changes made)
(ldr_exp_demelect: 2767 changes made)
(ldr_exp_supportparty: 2767 changes made)
(ldr_exp_pers_loyal: 2767 changes made)
(ldr_exp_pers_relative: 2767 changes made)
(ldr_exp_rulingfamily: 2767 changes made)
(ldr_exp_other: 2767 changes made)

.         alpha officepers newparty ldr_exp_pers_rel leaderrel, gen(pers) item 
>     /* create index using the larger sample */

Test scale = mean(unstandardized items)

                                                            average
                             item-test     item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alpha
-------------+-----------------------------------------------------------------
officepers   | 7358    +       0.8492        0.6091        .0179753      0.2988
newparty     | 7358    +       0.6718        0.3376         .047301      0.5629
ldr_exp_pe~e | 7358    +       0.2412        0.1275        .0853054      0.6566
leaderrela~s | 7358    +       0.7672        0.4759        .0318581      0.4414
-------------+-----------------------------------------------------------------
Test scale   |                                               .04561      0.5975
-------------------------------------------------------------------------------

.         hist pers, bin(50)
(bin=50, start=0, width=.02)

.         sum  pers gwf_personal if log_Primaryfdigdp~=.

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        pers |        940    .1601064      .24098          0        .75
gwf_personal |        946    .1310782    .3376644          0          1

.         gen gtime = ln(gwf_duration)
(704 missing values generated)

.         
.         *** All FDI ***
.         gen allfdi  =  (abs(fdigdp_unctad))^(1/3) if (oecd2==0 | (cow==70 | c
> ow==155 | cow==640 | cow==732)) & allregime~=. & year>=1980
(4,171 missing values generated)

.         replace allfdi = -1*allfdi if fdigdp_unctad<0 
(250 real changes made)

.         egen rawpre80fdi  =sum(fdigdp_unctad) if year<1980, by(cowcode)
(4410 missing values generated)

.         gen pre80fdi80 =  (abs(rawpre80fdi))^(1/3) if (oecd2==0 | (cow==70 | 
> cow==155 | cow==640 | cow==732)) & allregime~=.
(5,613 missing values generated)

.         replace  pre80fdi80 = pre80fdi80*-1 if rawpre80fdi<0
(121 real changes made)

.         egen pre80fdi= max(pre80fdi80),by(cow)
(1972 missing values generated)

.         drop rawpre80fdi pre80fdi80

.         
.         * keep only the GWF autocracy and democracy data *
.         drop if allregime==.
(828 observations deleted)

.         drop if year<1979 /*| year>2010*/
(2,262 observations deleted)

. 
.         *** Construct instrument ***
.         *********************************************************************
> *********
.         ** Note: the instrument for personalist regime is a binary variable f
> or         **
.         **              how the first regime leader seized power: election or
>  uprising,     **
.         **              the instrument is constructed from pre-seizure inform
> ation                      **
.         **              that correlates with personalist behavior once in pow
> er.                        **
.         *********************************************************************
> *********
.         recode seizure* (.=0)   /* coded as zero for all democracies */
(seizure_coup: 2051 changes made)
(seizure_rebel: 2051 changes made)
(seizure_foreign: 2051 changes made)
(seizure_uprising: 2051 changes made)
(seizure_election: 2051 changes made)
(seizure_succession: 2051 changes made)
(seizure_family: 2051 changes made)

.         gen inst =   (seizure_uprising==1 | (seizure_election==1 & partyhisto
> ry_priordem==0))

.         drop _merge

.         sort cow year

.         keep if oecd1==0  /* only non-OECD countries, except Mexico and S. Ko
> rea */
(861 observations deleted)

.         save temp, replace
file temp.dta saved

.         
.         *** Footnote: average regime duration by type ***
.         use temp,clear

.         sum year

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        year |      3,531    1994.876    9.155293       1979       2010

.         egen tag = tag(gwf_casename)

.         egen max = max(gwf_duration),by(gwf_casename)

.         table allregime if tag==1, c(n year mean max median max)

----------------------------------------------
allregime |    N(year)   mean(max)    med(max)
----------+-----------------------------------
        1 |        101    12.95049          10
        2 |         43    9.790698           9
        3 |         10        69.8        51.5
        4 |         62    34.74194          35
        5 |         62    14.67742          14
----------------------------------------------

.         
. *****************************************************************************
> *********************************
.         ****************
.         *** Analysis ***
.         ****************
.         
.         **************************
.         *** Sectoral FDI tests ***
.         **************************
.         use temp,clear

.         global cvarlist="allexp gtime lgdpcap lpop lopenness grow incidencev4
> 13 meanres ldevelopingfdi asia america easia ssa"

.         
.         *******************
.         * Sample features *
.         *******************
.         * Note sample sizes *
.         hist allfdi if gwf_pers~=., bin(50)
(bin=50, start=-2.4402626, width=.1370727)

.         xtset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.         xtregar allfdi gwf_personal $cvarlist  /* 109 countries */

RE GLS regression with AR(1) disturbances       Number of obs     =      2,827
Group variable: cowcode                         Number of groups  =        108

R-sq:                                           Obs per group:
     within  = 0.2451                                         min =          1
     between = 0.4265                                         avg =       26.2
     overall = 0.3056                                         max =         31

                                                Wald chi2(15)     =     455.75
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0458   0.2378     0.3159     0.3159   0.3159

------------------------------------------------------------------------------
      allfdi |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0309434   .0522944     0.59   0.554    -.0715517    .1334385
      allexp |  -.1417647   .0395767    -3.58   0.000    -.2193336   -.0641959
       gtime |  -.0047296   .0161296    -0.29   0.769    -.0363431    .0268839
     lgdpcap |  -.0093862   .0309517    -0.30   0.762    -.0700505    .0512781
        lpop |   .0376979   .0230441     1.64   0.102    -.0074677    .0828636
   lopenness |   .4183162   .0487058     8.59   0.000     .3228546    .5137777
        grow |   .0067393   .0017146     3.93   0.000     .0033787    .0100999
incidenc~413 |  -.0059153   .0382304    -0.15   0.877    -.0808455     .069015
meanreserves |  -.0337524   .0139759    -2.42   0.016    -.0611448   -.0063601
ldevelopin~i |   .1868463   .0143873    12.99   0.000     .1586477    .2150449
        asia |  -.0731296   .0995845    -0.73   0.463    -.2683117    .1220525
    americas |   .2231399   .0837665     2.66   0.008     .0589607    .3873192
       easia |   .0733735   .1167323     0.63   0.530    -.1554175    .3021645
         ssa |  -.0890698   .0804521    -1.11   0.268     -.246753    .0686133
       _cons |   -3.35653   .5110543    -6.57   0.000    -4.358178   -2.354882
-------------+----------------------------------------------------------------
      rho_ar |  .47920258   (estimated autocorrelation coefficient)
     sigma_u |  .18232397
     sigma_e |  .51033268
     rho_fov |  .11319076   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         egen count = count(year) if e(sample)==1,by(cow)
(704 missing values generated)

.         xtregar allfdi gwf_personal $cvarlist if count>1  /* 108 countries, d
> rop Afghanistan which only have 1 year in estimating sample */

RE GLS regression with AR(1) disturbances       Number of obs     =      2,826
Group variable: cowcode                         Number of groups  =        107

R-sq:                                           Obs per group:
     within  = 0.2451                                         min =          4
     between = 0.4373                                         avg =       26.4
     overall = 0.3057                                         max =         31

                                                Wald chi2(15)     =     455.87
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0884   0.2387     0.3169     0.3169   0.3169

------------------------------------------------------------------------------
      allfdi |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0326894   .0523951     0.62   0.533     -.070003    .1353819
      allexp |  -.1421275   .0395834    -3.59   0.000    -.2197096   -.0645454
       gtime |  -.0053072    .016159    -0.33   0.743    -.0369783    .0263639
     lgdpcap |  -.0096859   .0309882    -0.31   0.755    -.0704215    .0510498
        lpop |   .0374058   .0230747     1.62   0.105    -.0078197    .0826314
   lopenness |   .4182152    .048729     8.58   0.000      .322708    .5137223
        grow |   .0067945   .0017169     3.96   0.000     .0034294    .0101595
incidenc~413 |  -.0049062   .0382663    -0.13   0.898    -.0799067    .0700944
meanreserves |  -.0337345   .0139943    -2.41   0.016    -.0611628   -.0063062
ldevelopin~i |   .1872526   .0144025    13.00   0.000     .1590242    .2154811
        asia |  -.0676594   .1000534    -0.68   0.499    -.2637606    .1284417
    americas |   .2234749   .0838828     2.66   0.008     .0590676    .3878821
       easia |   .0737698   .1168932     0.63   0.528    -.1553367    .3028764
         ssa |  -.0899204   .0805716    -1.12   0.264    -.2478377     .067997
       _cons |  -3.352993   .5115537    -6.55   0.000     -4.35562   -2.350367
-------------+----------------------------------------------------------------
      rho_ar |  .47920258   (estimated autocorrelation coefficient)
     sigma_u |  .18283716
     sigma_e |  .51033519
     rho_fov |  .11375528   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         gen s1=e(sample)==1

.         xtregar cub_Primaryfdigdp gwf_personal  $cvarlist  /* 61 countries */

RE GLS regression with AR(1) disturbances       Number of obs     =        874
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.0418                                         min =          1
     between = 0.2203                                         avg =       14.6
     overall = 0.1683                                         max =         31

                                                Wald chi2(15)     =      54.98
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2220   0.4371     0.6156     0.6940   0.6940

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0654836   .0228045     2.87   0.004     .0207876    .1101797
      allexp |  -.0226784   .0089679    -2.53   0.011     -.040255   -.0051017
       gtime |   .0219945   .0058887     3.74   0.000     .0104529    .0335361
     lgdpcap |   -.034588   .0122184    -2.83   0.005    -.0585356   -.0106404
        lpop |  -.0002646   .0097523    -0.03   0.978    -.0193787    .0188495
   lopenness |   .0181927   .0201852     0.90   0.367    -.0213696     .057755
        grow |   .0022491   .0007411     3.03   0.002     .0007966    .0037015
incidenc~413 |  -.0066625   .0140534    -0.47   0.635    -.0342066    .0208817
meanreserves |   .0154501   .0062107     2.49   0.013     .0032773    .0276229
ldevelopin~i |   .0027984   .0054909     0.51   0.610    -.0079636    .0135605
        asia |  -.0518709   .0419842    -1.24   0.217    -.1341583    .0304165
    americas |   .0412845   .0322321     1.28   0.200    -.0218893    .1044582
       easia |   .0010396   .0444927     0.02   0.981    -.0861645    .0882437
         ssa |   .0405163   .0413637     0.98   0.327    -.0405549    .1215876
       _cons |    .166936    .203844     0.82   0.413    -.2325909    .5664629
-------------+----------------------------------------------------------------
      rho_ar |  .36866103   (estimated autocorrelation coefficient)
     sigma_u |  .07460873
     sigma_e |  .08588147
     rho_fov |  .43010539   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         gen s2 = e(sample)==1

.         egen maxs2 = max(s2) if s1==1,by(cow)
(705 missing values generated)

.         egen tag = tag(cow) if s1==1

.         
.         * 61 countries in sample, missingness over time *
.         gen decade  =year>=1980 & year<1990

.         replace decade =2 if year>=1990 & year<2000
(1,138 real changes made)

.         replace decade=3 if year>=2000
(1,255 real changes made)

.         table decade if maxs==1, c(mean s2 mean allfdi mean cub_Prim mean oil
> pc)

--------------------------------------------------------------------------
   decade |       mean(s2)    mean(allfdi)  mean(cub_Pr~p)     mean(oilpc)
----------+---------------------------------------------------------------
        1 |       .2374728        .7106385        .1024042        2.854865
        2 |       .4664311         1.10348        .1303925        2.374874
        3 |       .7990431        1.434416        .1362602        2.741181
--------------------------------------------------------------------------

.         
.         * Cross-section differences between two groups of countries *
.         gen m= .
(3,531 missing values generated)

.         gen n = _n

.         local var = "gwf_pers fdigdp_unctad lpop lgdpcap oilpc meanres"

.         local i = 1

.         foreach v of local var {
  2.                 egen m_`v'  =mean(`v') if s1==1,by(cow)
  3.                 egen s_`v' = std(m_`v') if tag==1
  4.                 ttest m_`v' if tag==1,by(maxs2) unequal
  5.         }
(705 missing values generated)
(3424 missing values generated)

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      47    .3162835    .0587258    .4026038    .1980746    .4344924
       1 |      60    .1651669    .0426849    .3306361    .0797546    .2505793
---------+--------------------------------------------------------------------
combined |     107    .2315453    .0357649    .3699551    .1606379    .3024527
---------+--------------------------------------------------------------------
    diff |            .1511166    .0725998                .0068453    .2953878
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   2.0815
Ho: diff = 0                     Satterthwaite's degrees of freedom =  88.2414

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9799         Pr(|T| > |t|) = 0.0403          Pr(T > t) = 0.0201
(705 missing values generated)
(3424 missing values generated)

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      47    3.165219    .5474391    3.753053    2.063281    4.267157
       1 |      60    2.733292    .2852159    2.209273    2.162577    3.304008
---------+--------------------------------------------------------------------
combined |     107    2.923017    .2880103    2.979201    2.352009    3.494026
---------+--------------------------------------------------------------------
    diff |            .4319268    .6172825               -.7991051    1.662959
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.6997
Ho: diff = 0                     Satterthwaite's degrees of freedom =  70.3222

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.7568         Pr(|T| > |t|) = 0.4864          Pr(T > t) = 0.2432
(705 missing values generated)
(3424 missing values generated)

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      47    15.73386     .157459    1.079485    15.41691    16.05081
       1 |      60    16.59646    .1926727    1.492436    16.21093      16.982
---------+--------------------------------------------------------------------
combined |     107    16.21756    .1343192    1.389408    15.95126    16.48386
---------+--------------------------------------------------------------------
    diff |           -.8626054    .2488295               -1.356021   -.3691894
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -3.4667
Ho: diff = 0                     Satterthwaite's degrees of freedom =  104.398

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0004         Pr(|T| > |t|) = 0.0008          Pr(T > t) = 0.9996
(705 missing values generated)
(3424 missing values generated)

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      47    7.025983    .1918913     1.31554    6.639726     7.41224
       1 |      60     7.28046    .1443317    1.117989    6.991653    7.569267
---------+--------------------------------------------------------------------
combined |     107     7.16868    .1169246    1.209477    6.936866    7.400495
---------+--------------------------------------------------------------------
    diff |           -.2544776    .2401123               -.7314846    .2225294
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.0598
Ho: diff = 0                     Satterthwaite's degrees of freedom =  90.2497

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1460         Pr(|T| > |t|) = 0.2921          Pr(T > t) = 0.8540
(705 missing values generated)
(3424 missing values generated)

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      47    2.435806    .4417875    3.028742    1.546533    3.325078
       1 |      60    2.629096    .3541918    2.743558     1.92036    3.337832
---------+--------------------------------------------------------------------
combined |     107    2.544193    .2764894    2.860029    1.996026     3.09236
---------+--------------------------------------------------------------------
    diff |           -.1932906    .5662403                -1.31759    .9310093
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.3414
Ho: diff = 0                     Satterthwaite's degrees of freedom =  93.8943

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.3668         Pr(|T| > |t|) = 0.7336          Pr(T > t) = 0.6332
(705 missing values generated)
(3424 missing values generated)

Two-sample t test with unequal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      47    1.473673    .3941119    2.701895    .6803669    2.266979
       1 |      60    1.576295    .2852714    2.209703    1.005468    2.147121
---------+--------------------------------------------------------------------
combined |     107    1.531218     .234589    2.426607    1.066122    1.996313
---------+--------------------------------------------------------------------
    diff |           -.1026217    .4865223               -1.069483    .8642397
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.2109
Ho: diff = 0                     Satterthwaite's degrees of freedom =  87.9962

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.4167         Pr(|T| > |t|) = 0.8334          Pr(T > t) = 0.5833

.         egen s_maxs2 =std(maxs) if tag==1
(3424 missing values generated)

.         
.         ******************
.         *** Figure F-3 ***
.         ******************
.         * Controlling for other things, group is not correlated with total FD
> I or personalist regime in the cross-section *
.         replace m_fdi  = ln(1+m_fdi)
(2,826 real changes made)

.         reg m_fdi s_maxs2  s_lpop s_lgdpcap s_oil if tag==1 ,

      Source |       SS           df       MS      Number of obs   =       107
-------------+----------------------------------   F(4, 102)       =      3.04
       Model |  3.73493114         4  .933732785   Prob > F        =    0.0207
    Residual |  31.3584216       102  .307435506   R-squared       =    0.1064
-------------+----------------------------------   Adj R-squared   =    0.0714
       Total |  35.0933528       106  .331069366   Root MSE        =    .55447

------------------------------------------------------------------------------
m_fdigdp_u~d |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     s_maxs2 |   .0635855   .0583181     1.09   0.278    -.0520882    .1792592
      s_lpop |  -.1800505   .0636541    -2.83   0.006    -.3063082   -.0537929
   s_lgdpcap |   .0494705    .070533     0.70   0.485    -.0904314    .1893723
     s_oilpc |  -.0083243   .0713772    -0.12   0.907    -.1499007    .1332521
       _cons |   1.182973   .0536025    22.07   0.000     1.076652    1.289293
------------------------------------------------------------------------------

.         est store f1

.         reg m_fdi s_maxs2  s_lpop s_lgdpcap s_mean if tag==1 ,

      Source |       SS           df       MS      Number of obs   =       107
-------------+----------------------------------   F(4, 102)       =      3.48
       Model |  4.21216483         4  1.05304121   Prob > F        =    0.0105
    Residual |  30.8811879       102  .302756744   R-squared       =    0.1200
-------------+----------------------------------   Adj R-squared   =    0.0855
       Total |  35.0933528       106  .331069366   Root MSE        =    .55023

------------------------------------------------------------------------------
m_fdigdp_u~d |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     s_maxs2 |   .0557098   .0573591     0.97   0.334    -.0580618    .1694813
      s_lpop |  -.1642442   .0590679    -2.78   0.006     -.281405   -.0470833
   s_lgdpcap |   .0917936   .0663304     1.38   0.169    -.0397725    .2233596
   s_meanres |  -.0824322   .0653708    -1.26   0.210     -.212095    .0472305
       _cons |   1.182973   .0531931    22.24   0.000     1.077465    1.288481
------------------------------------------------------------------------------

.         est store f2

.         glm m_gwf s_maxs2  s_lpop s_lgdpcap s_oil if tag==1 ,fam(binomial) li
> nk(logit)
note: m_gwf_pers has noninteger values

Iteration 0:   log likelihood = -46.235959  
Iteration 1:   log likelihood = -45.373886  
Iteration 2:   log likelihood = -45.363766  
Iteration 3:   log likelihood = -45.363764  

Generalized linear models                         No. of obs      =        107
Optimization     : ML                             Residual df     =        102
                                                  Scale parameter =          1
Deviance         =   72.3134897                   (1/df) Deviance =   .7089558
Pearson          =  70.92908116                   (1/df) Pearson  =   .6953831

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   .9413788
Log likelihood   = -45.36376434                   BIC             =  -404.3151

------------------------------------------------------------------------------
             |                 OIM
  m_gwf_pers |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     s_maxs2 |   -.205818   .2650163    -0.78   0.437    -.7252403    .3136044
      s_lpop |  -.5157956   .3276015    -1.57   0.115    -1.157883    .1262915
   s_lgdpcap |  -1.372488   .4504009    -3.05   0.002    -2.255257   -.4897183
     s_oilpc |   .8553629    .405601     2.11   0.035     .0603995    1.650326
       _cons |  -1.514954   .2995164    -5.06   0.000    -2.101995   -.9279123
------------------------------------------------------------------------------

.         est store p1

.         glm m_gwf s_maxs2  s_lpop s_lgdpcap s_mean if tag==1 ,fam(binomial) l
> ink(logit)
note: m_gwf_pers has noninteger values

Iteration 0:   log likelihood = -45.843815  
Iteration 1:   log likelihood = -44.936159  
Iteration 2:   log likelihood = -44.926284  
Iteration 3:   log likelihood = -44.926282  

Generalized linear models                         No. of obs      =        107
Optimization     : ML                             Residual df     =        102
                                                  Scale parameter =          1
Deviance         =  71.43852586                   (1/df) Deviance =   .7003777
Pearson          =  71.80174353                   (1/df) Pearson  =   .7039387

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   .9332015
Log likelihood   = -44.92628242                   BIC             =    -405.19

------------------------------------------------------------------------------
             |                 OIM
  m_gwf_pers |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     s_maxs2 |  -.2516472   .2650992    -0.95   0.342    -.7712322    .2679377
      s_lpop |  -.3883523   .3079797    -1.26   0.207    -.9919814    .2152767
   s_lgdpcap |  -1.322524   .4148688    -3.19   0.001    -2.135652    -.509396
   s_meanres |   .8362601   .3570166     2.34   0.019     .1365205       1.536
       _cons |  -1.530059   .3021587    -5.06   0.000    -2.122279   -.9378385
------------------------------------------------------------------------------

.         est store p2

.         label var s_lpop "Population"

.         label var s_lgdpcap "GDPpc"

.         label var s_oil "Oil rents"

.         label var s_mean `" "Oil    " "reserves"  "1980   " "' 

.         label var s_maxs2 `" "Included"  "countries" "' 

.         coefplot (f1, msymbol(T) mfcolor($color1) mcolor($color1) msize(medla
> rge) ciopts(lcol($color1 $color1))) /*
>         */ (f2, msymbol(O) mcolor($color3) mfcolor($color3) msize(medlarge) c
> iopts(lcol($color3 $color3))), /*
>         */ title("Total FDI")  scheme(lean2) drop(_cons) order(maxs s_lgdpcap
>  s_lpop s_oil s_mean) xlab(-.2 (.1) .2) xline(0, lpattern(dash)) /*
>         */ grid(glcolor(gs15)) mfcolor(white) ysize(2) xsize(3) saving(h1.gph
> ,replace) /*
>         */ legend(off) level(95 90)   xtitle("  Coefficient estimate", height
> (6)) 
(note: file h1.gph not found)
(file h1.gph saved)

.         coefplot (p1, msymbol(T) mcolor($color1) mfcolor($color1) msize(medla
> rge) ciopts(lcol($color1 $color1))) /*
>         */ (p2, msymbol(O) mcolor($color3) mfcolor($color3)  msize(medlarge) 
> ciopts(lcol($color3 $color3))), /*
>         */ title("Personalist regime")  scheme(lean2) drop(_cons) order(maxs 
> s_lgdpcap s_lpop s_oil s_mean) xlab(-2(1) 1.5) xline(0, lpattern(dash)) /*
>         */ grid(glcolor(gs15)) mfcolor(white) ysize(2) xsize(3) saving(h2.gph
> , replace) /*
>         */ legend(off)    level(95 90)  xtitle("  Coefficient estimate", heig
> ht(6)) 
(note: file h2.gph not found)
(file h2.gph saved)

.         graph combine h1.gph h2.gph,col(2) ysize(2) xsize(4) scheme(lean2)

.         graph export "$dir\golden\sample-conditional-means.pdf", as(pdf) repl
> ace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\sample-conditional-means.pdf written in PDF for
> mat)

. 
.         ******************
.         *** Figure F-2 ***
.         ******************
.         * Time varying estimate of personalist regime on total FDI is similar
>  is each group of countries *
.         gen l2openness = lopenness*4
(363 missing values generated)

.         gen gr2 = grow/8
(326 missing values generated)

.         global cvarlist="allexp gtime lgdpcap lpop l2openness gr2 incidencev4
> 13 meanres ldevelopingfdi asia america easia ssa"

.         xi:xtregar allfdi gwf_personal  $cvarlist if s1==1

RE GLS regression with AR(1) disturbances       Number of obs     =      2,826
Group variable: cowcode                         Number of groups  =        107

R-sq:                                           Obs per group:
     within  = 0.2451                                         min =          4
     between = 0.4373                                         avg =       26.4
     overall = 0.3057                                         max =         31

                                                Wald chi2(15)     =     455.87
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0884   0.2387     0.3169     0.3169   0.3169

------------------------------------------------------------------------------
      allfdi |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0326894   .0523951     0.62   0.533     -.070003    .1353819
      allexp |  -.1421275   .0395834    -3.59   0.000    -.2197096   -.0645454
       gtime |  -.0053072    .016159    -0.33   0.743    -.0369783    .0263639
     lgdpcap |  -.0096859   .0309882    -0.31   0.755    -.0704215    .0510498
        lpop |   .0374058   .0230747     1.62   0.105    -.0078197    .0826314
  l2openness |   .1045538   .0121823     8.58   0.000      .080677    .1284306
         gr2 |   .0543559   .0137351     3.96   0.000     .0274356    .0812762
incidenc~413 |  -.0049062   .0382663    -0.13   0.898    -.0799067    .0700944
meanreserves |  -.0337345   .0139943    -2.41   0.016    -.0611628   -.0063062
ldevelopin~i |   .1872526   .0144025    13.00   0.000     .1590242    .2154811
        asia |  -.0676594   .1000534    -0.68   0.499    -.2637606    .1284417
    americas |   .2234749   .0838828     2.66   0.008     .0590676    .3878821
       easia |   .0737698   .1168932     0.63   0.528    -.1553367    .3028764
         ssa |  -.0899204   .0805716    -1.12   0.264    -.2478377     .067997
       _cons |  -3.352993   .5115537    -6.55   0.000     -4.35562   -2.350367
-------------+----------------------------------------------------------------
      rho_ar |  .47920258   (estimated autocorrelation coefficient)
     sigma_u |  .18283716
     sigma_e |  .51033519
     rho_fov |  .11375528   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         xi:xtregar allfdi gwf_personal  $cvarlist if maxs==1

RE GLS regression with AR(1) disturbances       Number of obs     =      1,652
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.3146                                         min =         14
     between = 0.4843                                         avg =       27.5
     overall = 0.3575                                         max =         31

                                                Wald chi2(15)     =     332.19
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2019   0.2433     0.3213     0.3213   0.3213

------------------------------------------------------------------------------
      allfdi |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0777062   .0711693     1.09   0.275    -.0617831    .2171954
      allexp |  -.2109065   .0373841    -5.64   0.000     -.284178    -.137635
       gtime |   .0231004   .0187125     1.23   0.217    -.0135754    .0597763
     lgdpcap |   .0119428   .0364823     0.33   0.743    -.0595613    .0834469
        lpop |   .0383687   .0273582     1.40   0.161    -.0152524    .0919898
  l2openness |   .0871201   .0143216     6.08   0.000     .0590503    .1151899
         gr2 |   .0148213    .016822     0.88   0.378    -.0181492    .0477918
incidenc~413 |  -.0251114   .0454945    -0.55   0.581    -.1142791    .0640563
meanreserves |  -.0145583   .0171709    -0.85   0.397    -.0482126     .019096
ldevelopin~i |   .1746061    .016559    10.54   0.000      .142151    .2070612
        asia |   .0102619   .1171948     0.09   0.930    -.2194357    .2399595
    americas |   .2213572   .0868823     2.55   0.011      .051071    .3916434
       easia |   .1244323   .1173056     1.06   0.289    -.1054824    .3543471
         ssa |   .0285731   .1086799     0.26   0.793    -.1844356    .2415819
       _cons |   -3.17662   .5885489    -5.40   0.000    -4.330155   -2.023086
-------------+----------------------------------------------------------------
      rho_ar |  .51471115   (estimated autocorrelation coefficient)
     sigma_u |  .16019421
     sigma_e |  .41347611
     rho_fov |  .13051355   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         est store f1

.         xi:xtregar allfdi gwf_personal  $cvarlist if maxs==0

RE GLS regression with AR(1) disturbances       Number of obs     =      1,174
Group variable: cowcode                         Number of groups  =         47

R-sq:                                           Obs per group:
     within  = 0.2016                                         min =          4
     between = 0.6896                                         avg =       25.0
     overall = 0.3190                                         max =         31

                                                Wald chi2(15)     =     231.09
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0038   0.0117     0.0213     0.0213   0.0213

------------------------------------------------------------------------------
      allfdi |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0519161   .0728949     0.71   0.476    -.0909552    .1947874
      allexp |   .0952441   .0957823     0.99   0.320    -.0924858     .282974
       gtime |  -.0601267   .0279576    -2.15   0.032    -.1149227   -.0053308
     lgdpcap |  -.0277977   .0468454    -0.59   0.553    -.1196129    .0640175
        lpop |  -.0477636   .0370115    -1.29   0.197    -.1203048    .0247775
  l2openness |   .1397059     .01882     7.42   0.000     .1028193    .1765925
         gr2 |   .0899948   .0221882     4.06   0.000     .0465067     .133483
incidenc~413 |   .0179234   .0632783     0.28   0.777    -.1060998    .1419466
meanreserves |  -.0644152   .0194689    -3.31   0.001    -.1025736   -.0262568
ldevelopin~i |   .2176201   .0256567     8.48   0.000     .1673339    .2679063
        asia |  -.2630432   .1590686    -1.65   0.098    -.5748118    .0487255
    americas |  -.5124282   .3420846    -1.50   0.134    -1.182902    .1580453
       easia |   .3585922   .2712982     1.32   0.186    -.1731426     .890327
         ssa |  -.1883986   .1098639    -1.71   0.086    -.4037279    .0269306
       _cons |  -2.676418   .8022245    -3.34   0.001    -4.248749   -1.104087
-------------+----------------------------------------------------------------
      rho_ar |   .4548381   (estimated autocorrelation coefficient)
     sigma_u |  .04157357
     sigma_e |  .61822646
     rho_fov |  .00450174   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         est store f2

.         label var lgdpcap  "GDP per cap."

.         label var lpop  "Population"

.         label var allexp "Expropriations"

.         label var l2openness  "Trade openness"

.         label var lopenness  "Trade openness"

.         label var gr2 "Growth"

.         label var growth "Growth"

.         label var incidencev413 "Civil conflict"

.         label var meanres  "Oil reserves"

.         label var ldevelopingfdi "Total dev. FDI"

.         label var gwf_personal `" "Personalist"  "regime" "'

.         label var meanreserves   `" "Oil"  "reserves" "'

.         coefplot (f1, msymbol(T) mfcolor($color1) mcolor($color1) msize(medla
> rge) ciopts(lcol($color1 $color1))) /*
>         */ (f2, msymbol(S) mcolor($color2) mfcolor($color2) msize(medlarge) c
> iopts(lcol($color2 $color2))), /*
>         */ title("Total FDI")  scheme(lean2) drop(_cons gtime asia easia ssa 
> americas) order(gwf_pers) xlab(-.2 (.1) .2) xline(0, lpattern(dash)) /*
>         */ grid(glcolor(gs15)) ylab(,labsize(small)) mfcolor(white) level(95 
> 90) ysize(4) xsize(3) saving(h1.gph,replace) /*
>         */ legend(lab(3 "Included countries") lab(6 "Excluded countries") pos
> (6) col(2) ring(1))    xtitle("  Coefficient estimate", height(6))
(file h1.gph saved)

.         graph export "$dir\golden\sample-estimates.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\sample-estimates.pdf written in PDF format)

.         
.         ****************
.         *** Figure 3 ***
.         ****************
.         * Time trend in total FDI is similar in both groups of countries * 
.         global bw = 1

.         twoway   (lpolyci fdigdp_unctad year if maxs==0 & gwf_pers==0, lcolor
> (gs13) ciplot(rarea) bw($bw) saving(h1,replace) ///
>         legend(lab(4 "Included countries") lab(2 "Excluded countries") order(
> 2 4) pos(6) col(2) ring(1)) ///
>         scheme(lean2) yscale(range(-1 9))ylab(,glcolor(gs16)) xtitle(Year)) (
>  lpolyci fdigdp_unctad year if maxs==1 & gwf_pers==0, ///
>         ciplot(rline) bw($bw) ylab(0(4)12,glcolor(gs16)) ytitle("Total FDI, a
> ll sectors") xtitle(Year) title(Non-personalist,pos(12) ring(0))  )
(file h1.gph saved)

.         twoway   (lpolyci fdigdp_unctad year if maxs==0 & gwf_pers==1, lcolor
> (gs13) ciplot(rarea)bw($bw)  saving(h2,replace)  ///
>         legend(lab(4 "Included countries") lab(2 "Excluded countries") order(
> 2 4) pos(6) col(2) ring(1)) ///
>         scheme(lean2) ylab(,glcolor(gs16)) xtitle(Year))  (lpolyci fdigdp_unc
> tad year if maxs==1 & gwf_pers==1, ///
>         ciplot(rline)  bw($bw) yscale(range(-1 9))  ylab(0(4)12,glcolor(gs16)
> ) ytitle("Total FDI, all sectors") xtitle(Year) ///
>         title(Personalist,pos(12) ring(0)))  
(file h2.gph saved)

.         gr combine h1.gph h2.gph, xsize(8) title(Total FDI time trend)

.         erase h1.gph 

.         erase h2.gph

.         graph export "$dir\golden\sample-time-trend.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\sample-time-trend.pdf written in PDF format)

.         graph export "$dir\golden\ISQ-Figure-3.png", as(png) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-3.png written in PNG format)

. 
.         ******************
.         *** Figure 2.1 ***
.         ******************
.         cibar allfdi if maxs==1, over1(allregime) graphopts(saving(s1, replac
> e) title(Included countries) scheme(lean2) /*
>         */ ytitle(FDI (%GDP)) xlab(1.45 "Democracy" 2.85 "Military" 4.35 "Mon
> archy" 5.8 "Party" /*
>         */ 7.25 "Personal") ylabel(0 (.5) 1.5,glcolor(gs15)) legend(off)) bar
> color(gs15 gs14 gs13 gs12 gs11) bargap(45)
(file s1.gph saved)

.         cibar allfdi if maxs==0, over1(allregime) graphopts(saving(s2, replac
> e) title(Excluded countries) scheme(lean2) /*
>         */ ytitle(FDI (%GDP)) xlab(1.45 "Democracy" 2.85 "Military" 4.35 "Mon
> archy" 5.8 "Party" /*
>         */ 7.25 "Personal") ylabel(0 (.5) 1.5,glcolor(gs15)) legend(off)) bar
> color(gs15 gs14 gs13 gs12 gs11) bargap(45)
(file s2.gph saved)

.         gr combine s1.gph s2.gph, xsize(4.5) ysize(2) title("Total FDI, all s
> ectors", pos(6))

.         graph export "$dir\golden\sample-allfdi-means.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\sample-allfdi-means.pdf written in PDF format)

.         graph export "$dir\golden\ISQ-Figure-2.1.png", as(png) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-2.1.png written in PNG format)

. 
.         ******************
.         *** Figure 2.2 ***
.         ******************
.         cibar oilpc if maxs==1, level(90) over1(allregime) graphopts(saving(s
> 1, replace) title(Included countries) scheme(lean2) /*
>         */ ytitle("Mean oil rents pc (log)") xlab(1.45 "Democracy" 2.85 "Mili
> tary" 4.35 "Monarchy" 5.8 "Party" /*
>         */ 7.25 "Personal") yscale(range(0 5.2)) ylabel(0 (1) 5,glcolor(gs15)
> ) legend(off)) barcolor(gs15 gs14 gs13 gs12 gs11) bargap(45)
(file s1.gph saved)

.         cibar oilpc if maxs==0, level(90) over1(allregime) graphopts(saving(s
> 2, replace) title(Excluded countries) scheme(lean2) /*
>         */ ytitle("Mean oil rents pc (log)") yscale(range(0 5.2))  xlab(1.45 
> "Democracy" 2.85 "Military" 4.35 "Monarchy" 5.8 "Party" /*
>         */ 7.25 "Personal") ylabel(0 (1) 5,glcolor(gs15)) legend(off)) barcol
> or(gs15 gs14 gs13 gs12 gs11) bargap(45)
(file s2.gph saved)

.         gr combine s1.gph s2.gph, xsize(4.5) ysize(2) title("Oil rents", pos(
> 6))

.         graph export "$dir\golden\sample-oil-means.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\sample-oil-means.pdf written in PDF format)

.         graph export "$dir\golden\ISQ-Figure-2.2.png", as(png) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-2.2.png written in PNG format)

. 
.         ******************
.         *** Figure 2.3 ***
.         ******************
.         cibar lgdpcap if maxs==1, level(90) over1(allregime) graphopts(saving
> (s1, replace) title(Included countries) scheme(lean2) /*
>         */ ytitle("GDP pc (log)") xlab(1.45 "Democracy" 2.85 "Military" 4.35 
> "Monarchy" 5.8 "Party" /*
>         */ 7.25 "Personal") yscale(range(0 5.2)) ylabel(0 (2) 8,glcolor(gs15)
> ) legend(off)) barcolor(gs15 gs14 gs13 gs12 gs11) bargap(45)
(file s1.gph saved)

.         cibar lgdpcap if maxs==0, level(90) over1(allregime) graphopts(saving
> (s2, replace) title(Excluded countries) scheme(lean2) /*
>         */ ytitle("GDP pc (log)") yscale(range(0 5.2))  xlab(1.45 "Democracy"
>  2.85 "Military" 4.35 "Monarchy" 5.8 "Party" /*
>         */ 7.25 "Personal") ylabel(0 (2) 8,glcolor(gs15)) legend(off)) barcol
> or(gs15 gs14 gs13 gs12 gs11) bargap(45)
(file s2.gph saved)

.         gr combine s1.gph s2.gph, xsize(4.5) ysize(2) title("GDP per capita",
>  pos(6))

.         graph export "$dir\golden\sample-gdp-means.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\sample-gdp-means.pdf written in PDF format)

.         graph export "$dir\golden\ISQ-Figure-2.3.png", as(png) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-2.3.png written in PNG format)

. 
.         ********************
.         * Imputed data set *
.         ********************
.                 ******************
.                 *** Figure F-1 ***
.                 ******************
.          set more off

.          global m = 10                                                       
>            /* number of imputated data sets, estimates to average */

. 
.          forval i = 1/10 {
  2.                 import delimited using "$dir\imputed-fdi\primary`i'.csv",c
> lear
  3.                 qui:sort cow year
  4.                 qui:merge cow  year using "$dir\temp.dta"
  5.                 tab _merge
  6.                 global cvarlist="allexp gtime lgdpcap lpop lopenness grow 
> incidencev413 meanres ldevelopingfdi asia america easia ssa"
  7.                 qui:tsset cow year
  8.                 qui:xtregar cub_Primaryfdigdp gwf_personal $cvarlist, re  
>  /* No imputed data */
  9.                 gen s2=e(sample)
 10.                 qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist, re 
 11.                 est store impRE`i' 
 12.                 gen s1=e(sample)
 13.                 tab s1 s2
 14.                 twoway (hist cub_primaryfdigdp if s1==1 & s2==0,bin(60) bc
> ol(gs14) title(Imputed data `i',size(medsmall) height(6))) ///
>                 (kdensity cub_Primaryfdigdp if s2==1,bw(.01) lcol(gs1) legend
> (lab(1 "Imputed") lab(2 "Observed") ///
>                 col(1) ring(0) size(vsmall) pos(2)) xtitle("Primary FDI, %GDP
> ",height(4)size(medsmall)) ///
>                 xlab(-.4 (.4) .8) ytitle(Density,size(medsmall)) scheme(lean2
> ) ylab(,glcolor(gs16)) saving(h`i',replace))
 15.         }
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(note: file h1.gph not found)
(file h1.gph saved)
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(note: file h2.gph not found)
(file h2.gph saved)
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(file h3.gph saved)
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(file h4.gph saved)
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(file h5.gph saved)
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(file h6.gph saved)
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(file h7.gph saved)
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(file h8.gph saved)
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(file h9.gph saved)
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(file h10.gph saved)

.         gr combine h1.gph h2.gph h3.gph h4.gph h5.gph h6.gph h7.gph h8.gph h9
> .gph h10.gph,col(2) xsize(3) ysize(6)

.         graph export "$dir\golden\imputed-data.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\imputed-data.pdf written in PDF format)

. 
. 
.         /* 
>         Rubin (1987)
>         MI estimate of beta is the mean of the betas from each estimated beta
>  
>         MI estimate of variance is: Vb + Vw + Vb/m
>                 where Vb is the between variance, Vw is the mean variance, an
> d Vb/m is the sampling variance:
>                         Vb is the sum of the squared deviations from the mean
>  of the estimated betas
>                         Vw is the mean of the sampling variances (SE) from ea
> ch of the 10 imputed datasets
>         */ 
.         
.         ****************
.         * Main figures *   
.         ****************
.         cd "$dir"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files

.         use temp,clear

.         recode seizure_* (.=0)
(seizure_coup: 0 changes made)
(seizure_rebel: 0 changes made)
(seizure_foreign: 0 changes made)
(seizure_uprising: 0 changes made)
(seizure_election: 0 changes made)
(seizure_succession: 0 changes made)
(seizure_family: 0 changes made)

.         global cvarlist="allexp gtime lgdpcap lpop lopenness grow incidencev4
> 13 meanres ldevelopingfdi asia america easia ssa"

.         tsset cow year           
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.         set more off

.         
.         
.         capture program drop jwmi

.         program define jwmi
  1.                 matrix c = J(1,$m,1)                                      
>               /* matrix for obtaining columns sums */         
  2.                         * Get and store the estimates *
.                 matrix est = J($m,2,.)                                       
>            /* place to store estimates */
  3.                 forval i = 1/10{
  4.                         qui:est restore $imp`i'                           
>               /* get estimate */
  5.                         qui:nlcom _b[$v],post
  6.                         matrix beta =e(b)
  7.                         matrix var = e(V)
  8.                         matrix est[`i',1]==beta[1,1]
  9.                         matrix est[`i',2]==var[1,1]
 10.                 }
 11.                 matrix colnames est = beta var
 12.                 *matrix list est                                          
>                               /* show the estimates from tests for each imput
> ed data set */
.                         * Estimate of beta is the mean *
.                 matrix mean_b = (c*est)/$m                                   
>            /* calculate the mean of b */
 13.                 * Between variance, Vb *
.                 matrix cvb = J($m,1,.)
 14.                 forval i = 1/$m {
 15.                         matrix x ==est[`i',1]                             
>               /* get the x_i's  */
 16.                         matrix cvb[`i',1]==(x[1,1]- mean_b[1,1])^2  /* squ
> ared deviations from mean */
 17.                 }
 18.                 matrix  vb = (c*cvb)/($m-1)                               
>       /* sum squares and divide by n-1 */
 19.                         * Within variance, Vw *
.                 matrix vw = mean_b[1,2]
 20.                         *  Total variance *
.                 matrix tv = vw[1,1] + vb[1,1] + (vb[1,1]/$m)
 21.                         * Show the MI beta & se *
.                 matrix beta= mean_b[1,1]
 22.                 matrix se = sqrt(tv[1,1]) 
 23.                 matrix list beta
 24.                 matrix list se
 25.                         * Store results for graphing
.                 replace b = beta[1,1] if count==$count
 26.                 replace se = se[1,1] if count==$count
 27.                 replace hi =  beta[1,1] + 1.96*se[1,1] if count==$count
 28.                 replace lo =  beta[1,1] - 1.96*se[1,1] if count==$count
 29.                 replace mhi =  beta[1,1] + 1.65*se[1,1] if count==$count
 30.                 replace mlo =  beta[1,1] - 1.65*se[1,1] if count==$count
 31.                 replace model = "$imp" if count==$count
 32.                 global count=$count -1
 33.         end

. 
.                 
.                 ***************************************
.                 * Figure 4: Primary FDI, RE, AR(1)  *
.                 ***************************************
.                         forval i = 1(1)$m {
  2.                                 import delimited using "$dir\imputed-fdi\\
> primary`i'.csv",clear
  3.                                 qui:sort cow year
  4.                                 qui:merge cow  year using "$dir\temp.dta"
  5.                                 tab _merge
  6.                                 global cvarlist="allexp gtime lgdpcap lpop
>  lopenness grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
  7.                                 qui:tsset cow year
  8.                                 xtserial cub_primaryfdigdp gwf_personal $c
> varlist
  9.                                 qui:xtregar cub_primaryfdigdp gwf_personal
>  $cvarlist, re 
 10.                                 est store primaryAR1RE`i'
 11.                         }
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.908
           Prob > F =      0.1723
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      7.762
           Prob > F =      0.0071
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      3.824
           Prob > F =      0.0552
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.600
           Prob > F =      0.2107
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      3.707
           Prob > F =      0.0589
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      2.823
           Prob > F =      0.0981
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      2.862
           Prob > F =      0.0959
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      2.729
           Prob > F =      0.1038
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     14.971
           Prob > F =      0.0003
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      7.377
           Prob > F =      0.0086

.                         
.                                 gen hi =.
(3,595 missing values generated)

.                                 gen lo =.
(3,595 missing values generated)

.                                 gen mhi  =.
(3,595 missing values generated)

.                                 gen mlo =.
(3,595 missing values generated)

.                                 gen b =.
(3,595 missing values generated)

.                                 gen se = .
(3,595 missing values generated)

.                                 gen count =_n

.                                 gen model = ""
(3,595 missing values generated)

.                                 gen variable = ""                       
(3,595 missing values generated)

.                                 global count=10                              
>                                    /* number of specifications to test */

.                                 global ac = $count

.                                 global imp ="primaryAR1RE"

.                                 local var = "gwf_pers allexp gtime lgdpcap lp
> op lopenness grow incidencev413 meanres ldevelopingfdi"

.                                 foreach cvar of local var {
  2.                                                 global v = "`cvar'"       
>                                       /* name of variable of interest to plot
>  */
  3.                                                 qui:replace variable = "$v
> " if count==$count
  4.                                                 jwmi 
  5.                                 }

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str12
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.02062003

symmetric se[1,1]
           c1
r1  .01162431
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01892058

symmetric se[1,1]
           c1
r1  .00457564
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.03892239

symmetric se[1,1]
           c1
r1  .00939362
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00255095

symmetric se[1,1]
           c1
r1  .00683862
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01398799

symmetric se[1,1]
           c1
r1  .01659677
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00256101

symmetric se[1,1]
           c1
r1  .00101211
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.02858388

symmetric se[1,1]
           c1
r1  .01137253
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01179992

symmetric se[1,1]
           c1
r1  .00438007
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00714193

symmetric se[1,1]
           c1
r1  .00386123
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                                 gen e=round(b,.001)
(3,585 missing values generated)

.                                 gen s=round(se,.001)
(3,585 missing values generated)

.                                 browse variable e s hi lo

.                                 
.                                 twoway (scatter count b if count<=10,ylab(1(1
> )$ac,glcolor(gs16)) mlab(e) mlabpos(12) xlab(-.05(.05).1) ///
>                                 mcolor(gs6) msymbol(plus) yscale(range(0.75 1
> 0.25))  xtitle(Coefficient estimate) xline(0,lpat(dash))) ///
>                                 (rspike hi lo count if count<=10, horizontal 
> ytitle("") title(Personalist and Primary FDI,size(medium)) ///
>                                 ylab(1 "Total Developing FDI" 2 "Oil reserves
>  per cap. (log)" 3 "Civil conflict"  ///
>                                 4 "Annual GDP Growth" 5 "Trade (log)" 6 "Popu
> lation (log)" 7 "GDP per cap. (log)" ///
>                                 8 "Regime duration" 9 "Expropriations" 10 "{b
> f:Personalist}")  lcolor(gs6) lwidth(medthin) ///
>                                 legend(off) scheme(lean2)) (rspike mhi mlo co
> unt if count<=10, lwidth(thick) lcolor(gs6) horizontal)

.                                 graph export "$dir\golden\Main-Model.pdf", as
> (pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Main-Model.pdf written in PDF format)

.                                 graph export "$dir\golden\ISQ-Figure-4.png", 
> as(png) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-4.png written in PNG format)

.                                 
.                 
.                                 *********************************************
> ***********************************
.                                 *** Check bounds of omitted variable bias in 
> OLS with FE treated as controls ***
.                                 *** Oster, Emily. "Unobservable selection and
>  coefficient stability: Theory  ***
.                                 *** and evidence." Journal of Business & Econ
> omic Statistics (2014).         ***
.                                 *********************************************
> ***********************************
.                                 set scheme lean2

.                                 global m = 10                                
>                                    /* number of imputated data sets, estimate
> s to average */

.                                 matrix psa = J(10,4,.) 

.                                 forval i = 1(1)$m {
  2.                                         import delimited using "$dir\imput
> ed-fdi\primary`i'.csv",clear
  3.                                         qui:sort cow year
  4.                                         qui:merge cow  year using "$dir\te
> mp.dta"
  5.                                         global cvarlist="allexp gtime lgdp
> cap lpop lopenness grow incidencev413 ldeveloping meanres asia america easia 
> ssa"
  6.                                         qui:tsset cow year
  7.                                         qui:reg cub_primaryfdigdp i.cow gw
> f_pers  $cvarlist, 
  8.                                         qui:nlcom _b[gwf_pers],post
  9.                                         matrix beta =e(b)
 10.                                         matrix psa[`i',1]=beta[1,1]
 11.                                         matrix psa[`i',2]=e(N)
 12.                                         qui:reg cub_primaryfdigdp gwf_pers
>  $cvarlist, 
 13.                                         qui:psacalc beta gwf_pers,delta(.5
> ) rmax(1)
 14.                                         matrix psa[`i',3]=r(beta)
 15.                                         matrix psa[`i',4]=r(altsol1)
 16.                                 }
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)

.                                 matrix list psa         /* weird Large value 
> in psa[4,3] */

psa[10,4]
             c1          c2          c3          c4
 r1   .04154407        1782   .54975193   7.053e+15
 r2   .05096948        1782   .38609584   4.397e+15
 r3   .04095613        1782   .26565978   3.005e+15
 r4   .04275265        1782   6.798e+15  -6.798e+15
 r5    .0768548        1782   .31985461   3.584e+15
 r6   .03650472        1782   .29081943   3.231e+15
 r7   .06612417        1782   .40435967   4.550e+15
 r8   .06505616        1782   .32862237   3.643e+15
 r9   .05396932        1782   .30073575   3.275e+15
r10   .06075541        1782   .38610056   4.557e+15

.                                 mat psa[4,3]=0          /* conservatively ass
> ume true value is 0 */

.                                 matrix list psa

psa[10,4]
             c1          c2          c3          c4
 r1   .04154407        1782   .54975193   7.053e+15
 r2   .05096948        1782   .38609584   4.397e+15
 r3   .04095613        1782   .26565978   3.005e+15
 r4   .04275265        1782           0  -6.798e+15
 r5    .0768548        1782   .31985461   3.584e+15
 r6   .03650472        1782   .29081943   3.231e+15
 r7   .06612417        1782   .40435967   4.550e+15
 r8   .06505616        1782   .32862237   3.643e+15
 r9   .05396932        1782   .30073575   3.275e+15
r10   .06075541        1782   .38610056   4.557e+15

.                                 mata : st_matrix("B", (colsum(st_matrix("psa"
> ))/10))

.                                 matrix list B           /* if there is bias i
> n the OLS estimate, it is downwards */

B[1,4]
           c1         c2         c3         c4
r1  .05354869       1782  .32319999  3.050e+15

.  
.         ************
.         * Figure 7 *  Compare FDI sectors   & Oil vs. No oil
.         ************    
.                         * Different types of FDI *
.                                 * Secondary *
.                         forval i = 1(1)$m {
  2.                                 import delimited using "$dir\imputed-fdi\s
> econdary`i'.csv",clear
  3.                                 qui:sort cow year
  4.                                 qui:merge cow  year using "$dir\temp.dta"
  5.                                 tab _merge
  6.                                 global cvarlist="allexp gtime lgdpcap lpop
>  lopenness grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
  7.                                 qui:tsset cow year
  8.                                 xtserial cub_secondaryfdigdp gwf_personal 
> $cvarlist
  9.                                 qui:xtregar cub_Secondaryfdigdp gwf_person
> al $cvarlist, re   /* No imputed data */
 10.                                 gen s2=e(sample)==1
 11.                                 qui:xtregar cub_secondaryfdigdp gwf_person
> al $cvarlist, re 
 12.                                 gen s1=e(sample)==1
 13.                                 tab s1 s2
 14.                                 qui:xtregar cub_secondaryfdigdp gwf_person
> al $cvarlist, re 
 15.                                 est store secondAR1RE`i'
 16.                         }
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      0.015
           Prob > F =      0.9040

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      0.105
           Prob > F =      0.7473

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      0.790
           Prob > F =      0.3777

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      0.008
           Prob > F =      0.9308

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      0.002
           Prob > F =      0.9690

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      0.028
           Prob > F =      0.8676

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      0.492
           Prob > F =      0.4856

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      0.004
           Prob > F =      0.9529

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      2.547
           Prob > F =      0.1158

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      0.740
           Prob > F =      0.3931

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 


.                                 * Tertiary *
.                         forval i = 1(1)$m {
  2.                                 import delimited using "$dir\imputed-fdi\t
> ertiary`i'.csv",clear
  3.                                 qui:sort cow year
  4.                                 qui:merge cow  year using "$dir\temp.dta"
  5.                                 tab _merge
  6.                                 global cvarlist="allexp gtime lgdpcap lpop
>  lopenness grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
  7.                                 qui:tsset cow year
  8.                                 xtserial cub_tertiaryfdigdp gwf_personal $
> cvarlist
  9.                                 qui:xtregar cub_Tertiaryfdigdp gwf_persona
> l $cvarlist, re   /* No imputed data */
 10.                                 gen s2=e(sample)==1
 11.                                 qui:xtregar cub_tertiaryfdigdp gwf_persona
> l $cvarlist, re 
 12.                                 gen s1=e(sample)==1
 13.                                 tab s1 s2
 14.                                 qui:xtregar cub_tertiaryfdigdp gwf_persona
> l $cvarlist, re 
 15.                                 est store tertAR1RE`i'
 16.                         }
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      5.149
           Prob > F =      0.0269

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      8.143
           Prob > F =      0.0059

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      9.083
           Prob > F =      0.0038

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      8.145
           Prob > F =      0.0059

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      9.221
           Prob > F =      0.0035

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      8.126
           Prob > F =      0.0060

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     12.034
           Prob > F =      0.0010

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      9.452
           Prob > F =      0.0032

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     17.847
           Prob > F =      0.0001

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 

(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     11.559
           Prob > F =      0.0012

           |          s2
        s1 |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,813          0 |     1,813 
         1 |       891        891 |     1,782 
-----------+----------------------+----------
     Total |     2,704        891 |     3,595 


.                                         
.                                         gen hi =.
(3,595 missing values generated)

.                                         gen lo =.
(3,595 missing values generated)

.                                         gen mhi  =.
(3,595 missing values generated)

.                                         gen mlo =.
(3,595 missing values generated)

.                                         gen b =.
(3,595 missing values generated)

.                                         gen se =.
(3,595 missing values generated)

.                                         gen count =_n

.                                         gen model = ""
(3,595 missing values generated)

.                                         global count=3                       
>                                            /* number of specifications to tes
> t */

.                                         global ac = $count

.                                         global v = "gwf_personal"            
>                                    /* name of variable of interest to plot */

.                                         global imp ="primaryAR1RE"

.                                         jwmi

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str12
(1 real change made)

.                                         global imp ="secondAR1RE"

.                                         jwmi

symmetric beta[1,1]
            c1
r1  -.00639635

symmetric se[1,1]
           c1
r1  .01440701
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                                         global imp ="tertAR1RE"

.                                         jwmi 

symmetric beta[1,1]
           c1
r1  .01131121

symmetric se[1,1]
          c1
r1  .0156446
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                                         
.                                         gen e=round(b,.001)
(3,592 missing values generated)

.                                         browse model e hi mhi mlo lo

.                                         
.                                         twoway (scatter count b if count <=$a
> c,ylab(1(1)$ac,glcolor(gs16)) mlab(e) ///
>                                         mlabpos(12) xlab(-0.05(.05).1) mcolor
> (gs6) msymbol(plus) yscale(range(0.75 3.25)) ///
>                                         xtitle(Personalist estimate) xline(0,
> lpat(dash))) (rspike hi lo count if count<=$ac, horizontal ytitle("") ///
>                                         title("Personalism and sectoral FDI",
> size(medium)) ylab(1 "Tertiary" 2 "Secondary" 3 "Primary") ///
>                                         lcolor(gs6) lwidth(medthin) legend(of
> f) scheme(lean2) saving(h1.gph,replace)) ///
>                                         (rspike mhi mlo count if count<=$ac, 
> lwidth(thick) lcolor(gs6) horizontal) 
(file h1.gph saved)

.                          
.         
.                                 twoway (line ISICPrimary year if gwf_country=
> ="Tunisia" & ISICTertiary~=., /*
>                                 */ text(2475 2006 "Tunisie Telecom" "2006 pri
> vatization", place(sw)) /*
>                                 */ color(red) xtitle(Year) ytitle("Constant d
> ollars (millions)", height(6))scheme(lean2) xlab(1990 (5) 2005) /*
>                                 */ title(Sectoral FDI in Tunisia)) (line ISIC
> Secondary year if gwf_country=="Tunisia" & /*
>                                 */ ISICTertiary~=., color(blue)) (line ISICTe
> rtiary year if gwf_country=="Tunisia" & ISICTertiary~=., /*
>                                 */ color(green) ylab(,glcolor(gs15)) legend(l
> abel(1 "Primary") label(2 "Secondary") /*
>                                 */ label(3 "Tertiary")  pos(11) ring(0) col(1
> )))

.                         
.                  forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:merge cow  year using "$dir\temp.dta"
  5.                         tab _merge
  6.                         global cvarlist="allexp gtime lgdpcap lpop lopenne
> ss grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
  7.                         qui:tsset cow year
  8.                         xtserial cub_primaryfdigdp gwf_personal $cvarlist
  9.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st, re 
 10.                         gen s1=e(sample)==1
 11.                         egen max = max(l1res),by(cow)
 12.                         gen countryOIL = max>1
 13.                         tab countryOIL if s1==1
 14.                         egen tag = tag(cow) if s1==1
 15.                         tab countryOIL if tag==1
 16.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st, re 
 17.                         est store impMAIN`i'
 18.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if max<1, re 
 19.                         est store impNO`i'
 20.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if max>1, re 
 21.                         est store impOIL`i'
 22.                 }
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.908
           Prob > F =      0.1723
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      7.762
           Prob > F =      0.0071
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      3.824
           Prob > F =      0.0552
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.600
           Prob > F =      0.2107
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      3.707
           Prob > F =      0.0589
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      2.823
           Prob > F =      0.0981
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      2.862
           Prob > F =      0.0959
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      2.729
           Prob > F =      0.1038
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     14.971
           Prob > F =      0.0003
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      7.377
           Prob > F =      0.0086
(108 missing values generated)

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00

.                 
.                 egen max_pers = max(gwf_pers),by(cow)

.                 tab max_pers if countryOIL==1 & tag==1

   max_pers |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       74.29       74.29
          1 |          9       25.71      100.00
------------+-----------------------------------
      Total |         35      100.00

.                 tab max_pers if countryOIL==0 & tag==1

   max_pers |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         19       73.08       73.08
          1 |          7       26.92      100.00
------------+-----------------------------------
      Total |         26      100.00

. 
.                 gen hi =.
(3,595 missing values generated)

.                 gen lo =.
(3,595 missing values generated)

.                 gen mhi  =.
(3,595 missing values generated)

.                 gen mlo =.
(3,595 missing values generated)

.                 gen b =.
(3,595 missing values generated)

.                 gen se =.
(3,595 missing values generated)

.                 gen count =_n

.                 gen model = ""
(3,595 missing values generated)

. 
.                 global count=3                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_personal"                                    
>            /* name of variable of interest to plot */

.                 local mod = "MAIN NO OIL"

.                 foreach md of local mod {
  2.                         global imp ="imp`md'"
  3.                         jwmi
  4.                 }

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str7
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05367049

symmetric se[1,1]
           c1
r1  .02501442
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06861403

symmetric se[1,1]
           c1
r1  .02456129
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 gen e=round(b,.001)
(3,592 missing values generated)

.                 twoway (scatter count b if count<=3,ylab(6(1)$ac,glcolor(gs16
> )) mlab(e) mlabpos(12) xlab(-.05(.05).1) ///
>                 mcolor(gs6) msymbol(plus) yscale(range(0.75 3.25)) xtitle(Per
> sonalist estimate) xline(0,lpat(dash))) ///
>                 (rspike hi lo count if count<=3, horizontal ytitle("") title(
> Countries with low/high oil reserves,size(medium)) ///
>                 ylab(1 `""35 High oil" "countries""' 2 `""26 Low oil" "countr
> ies""' 3 `""All 61  " "countries""')  lcolor(gs6) lwidth(medthin) legend(off)
>  scheme(lean2))               ///
>                 (rspike mhi mlo count if count<=3, lwidth(thick) lcolor(gs6) 
> horizontal saving(h2.gph,replace))
(file h2.gph saved)

.                 gr combine h1.gph h2.gph

.                 graph export "$dir\golden\Sectoral-OilvNo.pdf", as(pdf) repla
> ce
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Sectoral-OilvNo.pdf written in PDF format)

.                 graph export "$dir\golden\ISQ-Figure-7.png", as(png) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-7.png written in PNG format)

. 
.                 erase h1.gph

.                 erase h2.gph

. 
.                 twoway (kdensity cub_prim if countryOIL==0 & s1==1,bw(.05) co
> lor(blue) ytitle(Density,height(6)) ///
>                 xtitle(Primary FDI)) (kdensity cub_prim if countryOIL==1 & s1
> ==1,bw(.05) legend(lab(1 "Low oil") ///
>                 lab(2 "High oil") pos(3) col(1) ring(0)) color(black) scheme(
> lean2) ylab(,glcolor(gs16)))

.                 
.                 ******************
.                 *** Figure L-1 ***
.                 ******************
.                 * T-test: HiOilNoPers has less Primary than LoOilYesPers * 
.                         forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         rename cub_primary cub`i'_primary
  4.                         sort cow year
  5.                         save mitemp`i',replace
  6.                         }               
(20 vars, 1,782 obs)
(note: file mitemp1.dta not found)
file mitemp1.dta saved
(20 vars, 1,782 obs)
(note: file mitemp2.dta not found)
file mitemp2.dta saved
(20 vars, 1,782 obs)
(note: file mitemp3.dta not found)
file mitemp3.dta saved
(20 vars, 1,782 obs)
(note: file mitemp4.dta not found)
file mitemp4.dta saved
(20 vars, 1,782 obs)
(note: file mitemp5.dta not found)
file mitemp5.dta saved
(20 vars, 1,782 obs)
(note: file mitemp6.dta not found)
file mitemp6.dta saved
(20 vars, 1,782 obs)
(note: file mitemp7.dta not found)
file mitemp7.dta saved
(20 vars, 1,782 obs)
(note: file mitemp8.dta not found)
file mitemp8.dta saved
(20 vars, 1,782 obs)
(note: file mitemp9.dta not found)
file mitemp9.dta saved
(20 vars, 1,782 obs)
(note: file mitemp10.dta not found)
file mitemp10.dta saved

.                         use mitemp1,clear

.                         sort cow year

.                         forval i = 2(1)10 {
  2.                                         merge cow year using mitemp`i'
  3.                                         tab _merge
  4.                                         drop _merge
  5.                                         sort cow year
  6.                                         save mitemp,replace
  7.                                         erase mitemp`i'.dta
  8.                         }
(note: you are using old merge syntax; see [D] merge for new syntax)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          3 |      1,782      100.00      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(note: file mitemp.dta not found)
file mitemp.dta saved
(note: you are using old merge syntax; see [D] merge for new syntax)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          3 |      1,782      100.00      100.00
------------+-----------------------------------
      Total |      1,782      100.00
file mitemp.dta saved
(note: you are using old merge syntax; see [D] merge for new syntax)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          3 |      1,782      100.00      100.00
------------+-----------------------------------
      Total |      1,782      100.00
file mitemp.dta saved
(note: you are using old merge syntax; see [D] merge for new syntax)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          3 |      1,782      100.00      100.00
------------+-----------------------------------
      Total |      1,782      100.00
file mitemp.dta saved
(note: you are using old merge syntax; see [D] merge for new syntax)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          3 |      1,782      100.00      100.00
------------+-----------------------------------
      Total |      1,782      100.00
file mitemp.dta saved
(note: you are using old merge syntax; see [D] merge for new syntax)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          3 |      1,782      100.00      100.00
------------+-----------------------------------
      Total |      1,782      100.00
file mitemp.dta saved
(note: you are using old merge syntax; see [D] merge for new syntax)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          3 |      1,782      100.00      100.00
------------+-----------------------------------
      Total |      1,782      100.00
file mitemp.dta saved
(note: you are using old merge syntax; see [D] merge for new syntax)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          3 |      1,782      100.00      100.00
------------+-----------------------------------
      Total |      1,782      100.00
file mitemp.dta saved
(note: you are using old merge syntax; see [D] merge for new syntax)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          3 |      1,782      100.00      100.00
------------+-----------------------------------
      Total |      1,782      100.00
file mitemp.dta saved

.                         erase mitemp1.dta

.                         use mitemp,clear

.                         qui:sort cow year

.                         qui:merge cow  year using "$dir\temp.dta"

.                         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

.                         global cvarlist="allexp gtime lgdpcap lpop lopenness 
> grow incidencev413 meanres ldevelopingfdi asia america easia ssa"

.                         qui:tsset cow year

.                         gen meanprimary =  (cub1_primary+ cub2_primary+  cub3
> _primary + cub4_primary + cub6_primary + cub7_primary + cub8_primary + cub9_p
> rimary + cub10_primary)/10
(1,813 missing values generated)

.                         xtserial meanprimary gwf_personal $cvarlist

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     10.393
           Prob > F =      0.0020

.                         qui:xtregar meanprimary gwf_personal $cvarlist, re 

.                         gen s1=e(sample)==1

.                         egen max = max(l1res),by(cow)
(108 missing values generated)

.                         gen countryOIL = max>1

.                         tab countryOIL if s1==1

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        769       43.15       43.15
          1 |      1,013       56.85      100.00
------------+-----------------------------------
      Total |      1,782      100.00

.                         egen tag = tag(cow) if s1==1

.                         tab countryOIL if tag==1

 countryOIL |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         26       42.62       42.62
          1 |         35       57.38      100.00
------------+-----------------------------------
      Total |         61      100.00

.                         gen hiOilnoPers = countryOIL==1 & gwf_pers==0 & s1==1

.                         gen loOilyesPers = countryOIL==0 & gwf_pers==1 & s1==
> 1

.                         egen mmean = mean(meanprimary),by(gwf_casename)
(1769 missing values generated)

.                         * Cases *
.                         egen tag2 = tag(gwf_casename) if (loOilyesPers==1 | h
> iOilnoPers==1) & s1==1  

.                         tab loOilyes if tag2==1

loOilyesPer |
          s |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         55       83.33       83.33
          1 |         11       16.67      100.00
------------+-----------------------------------
      Total |         66      100.00

.                         list gwf_casename mmean if tag2==1 & loOilyes==1,clea
> n noobs

        gwf_casename      mmean  
       Armenia 94-98   .0550263  
       Armenia 98-NA   .1222322  
    Mauritania 78-05   .1965573  
    Mauritania 08-NA   .1041217  
        Uganda 80-85   .0925065  
        Uganda 86-NA   .1473298  
        Malawi 64-94   .1632005  
    Madagascar 75-93   .1494596  
    Madagascar 09-NA   .3818855  
    Bangladesh 75-82   .0955199  
    Bangladesh 82-90   .0878774  

.                         list gwf_casename mmean if tag2==1 & hiOilnoPers==1,c
> lean noobs

          gwf_casename      mmean  
          Mexico 15-00   .0406236  
       Guatemala 70-85   .1206441  
       Guatemala 85-95   .1117022  
       Guatemala 95-NA   .1215795  
        Colombia 58-NA   .1519236  
       Venezuela 58-05   .0858769  
         Ecuador 79-NA   .1533131  
            Peru 68-80   .0916802  
            Peru 80-92   .0744993  
            Peru 00-01   .0972746  
            Peru 01-NA   .1331289  
          Brazil 64-85   .0895672  
          Brazil 85-NA   .0978565  
         Bolivia 79-80   .1803696  
         Bolivia 80-82   .1871153  
         Bolivia 82-NA   .2235196  
           Chile 73-89   .1611944  
           Chile 89-NA   .1582748  
       Argentina 76-83   .0724804  
       Argentina 83-NA   .1267677  
         Albania 44-91   .0863169  
         Albania 91-NA   .0750553  
          Russia 91-93   .0180653  
         Ukraine 91-NA   .1044756  
      Azerbaijan 92-93   .0343257  
           Benin 90-91   .2183489  
           Benin 91-NA   .1186734  
         Nigeria 79-83   .1011443  
         Nigeria 83-93   .2099484  
         Nigeria 93-99   .2725695  
         Nigeria 99-NA   .2010528  
        Tanzania 64-NA   .1312691  
         Tunisia 56-NA   .2110625  
            Iran 79-NA   .0721008  
           Egypt 52-NA   .1939223  
           Syria 63-NA   .1554341  
          Jordan 46-NA   .1434235  
    Saudi Arabia 27-NA   .0396185  
          Oman 1741-NA   .2075529  
           China 49-NA   .1110093  
           India 47-NA   .0369945  
        Pakistan 77-88   .1138059  
        Pakistan 88-99    .080901  
        Pakistan 99-08   .0489997  
        Pakistan 08-NA   .0340191  
        Thailand 76-88   .0900711  
        Thailand 88-91   .0850714  
        Thailand 91-92   .0915007  
        Thailand 92-06   .0487991  
        Thailand 06-07   .1571994  
        Thailand 07-NA   .0811074  
        Malaysia 57-NA   .1706461  
     Philippines 86-NA   .0601599  
       Indonesia 66-99   .0664562  
       Indonesia 99-NA   .0442419  

.                         * T-test *
.                         ttest meanprimary if loOilyesPers==1 | hiOilnoPers==1
> , by(gwf_pers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     890    .1190415    .0029511    .0880383    .1132497    .1248334
       1 |     114    .1483858    .0095925    .1024203    .1293812    .1673903
---------+--------------------------------------------------------------------
combined |   1,004    .1223734    .0028471    .0902129    .1167865    .1279604
---------+--------------------------------------------------------------------
    diff |           -.0293442    .0089305               -.0468689   -.0118195
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -3.2858
Ho: diff = 0                                     degrees of freedom =     1002

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0005         Pr(|T| > |t|) = 0.0011          Pr(T > t) = 0.9995

.                         twoway (kdensity meanprimary if loOilyesPers==1) (kde
> nsity meanprimary if hiOilnoPers==1,scheme(lean2) ///
>                                 ytitle(Density) xtitle(Primary FDI) ylab(,glc
> ol(gs12)) legend(lab(1 "Personalist, low oil") ///
>                                 lab(2 "Non-personalist, high oil") pos(6) col
> (2) ring(1)) ///
>                                 text(4  .25 " {bf:{&mu} =0.148}",linegap(-1.3
> )place(n)) ///
>                                 text(3  -.025 " {bf:{&mu} =0.119}",linegap(-1
> .3)place(n)))

.                         erase mitemp.dta

.                         graph export "$dir\golden\ttest-HiLo.pdf", as(pdf) re
> place
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ttest-HiLo.pdf written in PDF format)

.         
.                 ****************
.                 *** Figure 6 ***
.                 ****************
.                 *** Different estimators + 2SLS ***     
.                 forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:merge cow  year using "$dir\temp.dta"
  5.                         keep if cub_prim~=.
  6.                         tab _merge
  7.                         recode inst (.=0)
  8.                         qui:global cvarlist="allexp gtime lgdpcap lpop lop
> enness grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
  9.                         qui:tsset cow year
 10.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st, re 
 11.                         est store impMAIN`i'
 12.                         qui:xtivreg cub_primaryfdigdp (gwf_personal=inst) 
> $cvarlist, re ec vce(cluster cow) regress
 13.                         est store impRE`i'
 14.                         qui:xtivreg cub_primaryfdigdp (gwf_personal=inst) 
> $cvarlist, re ec vce(cluster cow)
 15.                         est store impREIV`i'
 16.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st, fe 
 17.                         est store impAR1FE`i'
 18.                         qui:xtivreg2 cub_primaryfdigdp gwf_personal $cvarl
> ist, fe bw(2) rob  
 19.                         est store impHACFE`i'
 20.                         qui:xtivreg2 cub_primaryfdigdp (gwf_personal=inst)
>  $cvarlist, fe bw(2) rob
 21.                         est store impHACFEIV`i'
 22.                 }
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)
(20 vars, 1,782 obs)
(1,813 observations deleted)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        3.59        3.59
          3 |      1,718       96.41      100.00
------------+-----------------------------------
      Total |      1,782      100.00
(inst: 64 changes made)

.                 gen hi =.
(1,782 missing values generated)

.                 gen lo =.
(1,782 missing values generated)

.                 gen mhi  =.
(1,782 missing values generated)

.                 gen mlo =.
(1,782 missing values generated)

.                 gen b =.
(1,782 missing values generated)

.                 gen se =.
(1,782 missing values generated)

.                 gen count =_n

.                 gen model = ""
(1,782 missing values generated)

. 
.                 
.                 global count=6                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_personal"                                    
>            /* name of variable of interest to plot */

.                 local mod = "MAIN RE REIV AR1FE HACFE HACFEIV"

.                 foreach md of local mod {
  2.                         global imp ="imp`md'"
  3.                         jwmi
  4.                 }

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str7
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05858594

symmetric se[1,1]
           c1
r1  .02162054
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06469283

symmetric se[1,1]
           c1
r1  .03438012
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05594291

symmetric se[1,1]
           c1
r1  .02385417
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str7 now str8
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05354869

symmetric se[1,1]
           c1
r1  .02354576
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
         c1
r1  .068138

symmetric se[1,1]
           c1
r1  .04021232
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str8 now str10
(1 real change made)

.                 gen e=round(b,.001)
(1,776 missing values generated)

.                 twoway (scatter count b if count<=6,ylab(3(1)$ac,glcolor(gs16
> )) mlab(e) mlabpos(12) xlab(0(.05).15) ///
>                 mcolor(gs6) msymbol(plus) yscale(range(0.75 6.25)) ///
>                 xtitle(Personalist estimate) xline(0,lpat(dash))) (rspike hi 
> lo count if count<=6, horizontal ytitle("") ///
>                 title(Different estimators,size(medium)) ///
>                 ylab(1 `""2SLS" "FE  "  "HAC""' 2 `""FE  " "HAC""' 3 `""FE   
> " "AR(1)""'  ///
>                 4 `""2SLS " "RE   " "cluster""' 5 `""RE   " "cluster""'  6 `"
> "RE  " "AR(1)""') ///
>                 lcolor(gs6) lwidth(medthin) legend(off) scheme(lean2))       
>    ///
>                 (rspike mhi mlo count if  count<=6, lwidth(thick) lcolor(gs6)
>  horizontal)  

.                 graph export "$dir\golden\Robust-Estimators.pdf", as(pdf) rep
> lace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Robust-Estimators.pdf written in PDF format)

.                 graph export "$dir\golden\ISQ-Figure-6.png", as(png) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-6.png written in PNG format)

. 
. ****************
. *** Figure 5 ***
. ****************
.                 *** First stage ****
.                 forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:merge cow  year using "$dir\temp.dta"
  5.                         qui:tab _merge
  6.                         global cvarlist="allexp gtime lgdpcap lpop lopenne
> ss grow incidencev413 ldevelopingfdi"
  7.                         qui:tsset cow year
  8.                         qui:xtivreg2 gwf_personal inst  $cvarlist if cub_p
> rim~=., fe bw(2) rob 
  9.                         est store impFIRST`i'
 10.                         test inst
 11.                 }
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   45.94
         Prob > chi2 =    0.0000
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   46.60
         Prob > chi2 =    0.0000
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   46.27
         Prob > chi2 =    0.0000
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   46.84
         Prob > chi2 =    0.0000
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   46.78
         Prob > chi2 =    0.0000
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   46.43
         Prob > chi2 =    0.0000
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   46.44
         Prob > chi2 =    0.0000
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   46.51
         Prob > chi2 =    0.0000
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   46.77
         Prob > chi2 =    0.0000
(20 vars, 1,782 obs)

 ( 1)  inst = 0

           chi2(  1) =   46.66
         Prob > chi2 =    0.0000

.                 gen hi =.
(3,595 missing values generated)

.                 gen lo =.
(3,595 missing values generated)

.                 gen mhi  =.
(3,595 missing values generated)

.                 gen mlo =.
(3,595 missing values generated)

.                 gen b =.
(3,595 missing values generated)

.                 gen se =.
(3,595 missing values generated)

.                 gen count =_n

.                 gen model = ""
(3,595 missing values generated)

.                 gen variable = ""
(3,595 missing values generated)

. 
.                                 global count=9                               
>                            /* number of specifications to test */

.                                 global ac = $count

.                                 global imp ="impFIRST"

.                                 local var = "inst allexp gtime lgdpcap lpop l
> openness grow incidencev413 ldevelopingfdi"

.                                 foreach cvar of local var {
  2.                                                 global v = "`cvar'"       
>                                       /* name of variable of interest to plot
>  */
  3.                                                 qui:replace variable = "$v
> " if count==$count
  4.                                                 jwmi 
  5.                                 }

symmetric beta[1,1]
           c1
r1  .54775697

symmetric se[1,1]
           c1
r1  .08030913
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str8
(1 real change made)

symmetric beta[1,1]
           c1
r1  .02339984

symmetric se[1,1]
           c1
r1  .02033691
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .04501136

symmetric se[1,1]
           c1
r1  .01098762
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01283371

symmetric se[1,1]
           c1
r1  .01902631
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.24623638

symmetric se[1,1]
           c1
r1  .06783357
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.04128526

symmetric se[1,1]
           c1
r1  .02005356
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00030941

symmetric se[1,1]
           c1
r1  .00099311
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .02404066

symmetric se[1,1]
           c1
r1  .01703031
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00593101

symmetric se[1,1]
           c1
r1  .00856894
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                                 gen e=round(b,.001)
(3,586 missing values generated)

.                                 gen s=round(se,.001)
(3,586 missing values generated)

.                                 browse variable e s hi lo

.                                 
.                                 twoway (scatter count b if count<=9,ylab(1(1)
> $ac,glcolor(gs16)) mlab(e) mlabpos(12) xlab(-.4(.2).6) ///
>                                 mcolor(gs6) msymbol(plus) yscale(range(0.75 9
> .25))  xtitle(Coefficient estimate) xline(0,lpat(dash))) ///
>                                 (rspike hi lo count if count<=9, horizontal y
> title("") title("First stage regression",size(medium)) ///
>                                 ylab(1 "Total Developing FDI" 2 "Civil confli
> ct"  ///
>                                 3 "Annual GDP Growth" 4 "Trade (log)" 5 "Popu
> lation (log)" 6 "GDP per cap. (log)" ///
>                                 7 "Regime duration" 8 "Expropriations" 9 "{bf
> :Instrument}")  lcolor(gs6) lwidth(medthin) ///
>                                 legend(off) scheme(lean2)) (rspike mhi mlo co
> unt if count<=9, lwidth(thick) lcolor(gs6) horizontal ///
>                                 text(1 .4 "F statistic{sub:Instrument} = 46",
> size(small)))

.                                 graph export "$dir\golden\First.pdf", as(pdf)
>  replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\First.pdf written in PDF format)

.                                 graph export "$dir\golden\ISQ-Figure-5.png", 
> as(png) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-5.png written in PNG format)

. 
. 
.         *********************************
.         *** Appendix S: Summary Stats ***
.         *********************************
.         label var lgdpcap  "GDP per cap. (log)"

.         label var lgdp  "GDP (log)"

.         label var lpop  "Population (log)"

.         label var lopenness  "Trade open (log)"

.         label var grow "Annual GDP Growth"

.         label var allexp "Expropriations"

.         label var incidencev413 "Civil conflict"

.         label var meanres  "Pre-1980 oil reserves per cap. (log) "

.         label var ldevelopingfdi "Total developing FDI"

.         label var gwf_personal "Personalist"

.         label var gtime "Regime duration (log)"

.         label var asia "Asia"

.         label var ssa "Sub-Saharan Africa"

.         label var america "Americas"

.         label var easia "East Asia"

.         global m = 10

.         matrix store = J($m,4,.)                                             
>            /* matrix for storing stats */          

.         forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:merge cow  year using "$dir\temp.dta"
  5.                         qui:tab _merge
  6.                         global cvarlist="allexp gtime lgdpcap lpop lopenne
> ss grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
  7.                         qui:tsset cow year
  8.                         qui:reg cub_primary gwf_personal $cvarlist 
  9.                         keep if e(sample)==1
 10.                         keep cub_primary gwf_personal $cvarlist 
 11.                         qui:sum cub_primary
 12.                         matrix store[`i',1]=r(mean)
 13.                         matrix store[`i',2]=r(sd) 
 14.                         matrix store[`i',3]=r(min)
 15.                         matrix store[`i',4]=r(max)
 16.                 }
(20 vars, 1,782 obs)
(1,813 observations deleted)
(20 vars, 1,782 obs)
(1,813 observations deleted)
(20 vars, 1,782 obs)
(1,813 observations deleted)
(20 vars, 1,782 obs)
(1,813 observations deleted)
(20 vars, 1,782 obs)
(1,813 observations deleted)
(20 vars, 1,782 obs)
(1,813 observations deleted)
(20 vars, 1,782 obs)
(1,813 observations deleted)
(20 vars, 1,782 obs)
(1,813 observations deleted)
(20 vars, 1,782 obs)
(1,813 observations deleted)
(20 vars, 1,782 obs)
(1,813 observations deleted)

.         matrix c = J(1,$m,1)                                                 
>    /* matrix for obtaining columns sums */         

.         matrix means = (c*store)/$m                                          
>    /* calculate the column means */

.         matrix colnames means = mean sd min max

.         matrix list means

means[1,4]
          mean          sd         min         max
r1   .12055909   .13161997  -.37682937   .77802235

.         
.         *****************
.         *** Table S-1 ***
.         *****************
.         sutex gwf_personal allexp gtime lgdpcap lpop lopenness grow incidence
> v413 meanres ///
>         ldevelopingfdi asia america easia ssa, labels digits(2) minmax
%------- Begin LaTeX code -------%

\begin{table}[htbp]\centering \caption{Summary statistics \label{sumstat}}
\begin{tabular}{l c c c c }\hline\hline
\multicolumn{1}{c}{\textbf{Variable}} & \textbf{Mean}
 & \textbf{Std. Dev.}& \textbf{Min.} &  \textbf{Max.} \\ \hline
gwf\_personal & 0.13 & 0.34 & 0 & 1 \\
allexp & 0.1 & 0.39 & 0 & 6.31 \\
gtime & 2.62 & 1.11 & 0 & 5.59 \\
lgdpcap & 7.33 & 1.17 & 4.34 & 10.46 \\
lpop & 16.64 & 1.5 & 13.78 & 21.01 \\
lopenness & 4.1 & 0.58 & 2.31 & 6.09 \\
grow & 3.77 & 5.7 & -41.8 & 34.5 \\
incidencev413 & 0.25 & 0.43 & 0 & 1 \\
meanreserves & 1.53 & 2.17 & 0 & 9.14 \\
ldevelopingfdi & 11.52 & 1.3 & 8.91 & 13.45 \\
asia & 0.14 & 0.34 & 0 & 1 \\
americas & 0.31 & 0.46 & 0 & 1 \\
easia & 0.12 & 0.33 & 0 & 1 \\
ssa & 0.19 & 0.39 & 0 & 1 \\
\multicolumn{1}{c}{N} & \multicolumn{4}{c}{1782}\\ \hline
\end{tabular}
\end{table}
%------- End LaTeX code -------%

. 
. 
.         ****************************************
.         *** Appendix A: OLS robustness tests ***
.         ****************************************
.         **************
.         * Figure A-1 *  Robustness tests
.         **************
.                 forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:save temp_primary,replace
  5.                         import delimited using "$dir\imputed-fdi\secondary
> `i'.csv",clear
  6.                         qui:sort cow year
  7.                         qui:save temp_secondary,replace
  8.                         import delimited using "$dir\imputed-fdi\tertiary`
> i'.csv",clear
  9.                         qui:sort cow year
 10.                         merge cow year using temp_primary
 11.                         qui:drop _merge
 12.                         qui:sort cow year
 13.                         merge cow year using temp_secondary
 14.                         qui:rename _merge sector_merge
 15.                         qui: sort cow year
 16.                         qui:merge cow  year using "$dir\temp.dta"
 17.                         qui:keep if sector_merge==3
 18.                         qui:drop sector_merge // brib*
 19.                         
.                         gen cub_rpfdi  = (abs(rpfdi))^(1/3)
 20.                         replace cub_rpfdi = -1*cub_rpfdi if rpfdi<0
 21.                         replace cub_rpfdi=cub_rpfdi/50 /* rescale to same 
> scale as cub_primary */
 22.                         *hist cub_rpfdi if gwf_pers~=., bin(50)
.                         gen log_rgdp = ln(rgdpo)
 23.                         gen time  = year-1979
 24.                         gen time2 = time^2
 25.                         gen time3 = time^3
 26.         
.                         global cvarlist="allexp gtime lgdpcap lpop lopenness 
> grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
 27.                         tsset cow year
 28.                         * Base *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist,
>  re   
 29.                         est store impRob0`i'
 30.                         * No controls *
.                         qui:xtregar cub_primaryfdigdp gwf_personal, re   
 31.                         est store impRob1`i'
 32.                         * Primary FDI without GDP in denominator *
.                         qui:xtregar cub_rpfdi gwf_personal allexp gtime log_r
> gdp lpop lopenness grow incidencev413 meanres ldevelopingfdi asia america eas
> ia ssa, re  /* no controls */
 33.                         est store impRob2`i'
 34.                         * Non-linear time trend *
.                         qui:xtregar cub_primaryfdigdp gwf_personal time* $cva
> rlist, re  
 35.                         est store impRob3`i'
 36.                         * Other sector FDI *
.                         qui:xtregar cub_primaryfdigdp gwf_personal cub_second
> ary cub_tertiary $cvarlist,re 
 37.                         est store impRob4`i'
 38.                         * Other regime types
.                         qui:xtregar cub_primaryfdigdp gwf_personal gwf_monarc
> hy gwf_mil gwf_party $cvarlist,re 
 39.                         est store impRob5`i'
 40.                         * Just dictatorships *
.                         qui:xtregar cub_primaryfdigdp gwf_pers $cvarlist if g
> wf_regime~="NA",re
 41.                         est store impRob6`i'
 42.                         * Personalism index *
.                         qui:xtregar cub_primaryfdigdp pers $cvarlist,re
 43.                         est store impRob7`i'
 44.                         * Add PolCon to specification *
.                         qui:xtregar cub_primaryfdigdp gwf_pers $cvarlist lpol
> con,re
 45.                         est store impRob8`i'
 46.                 }
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(891 missing values generated)
(59 real changes made)
(784 real changes made)
(64 missing values generated)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

.                 gen hi =.
(1,782 missing values generated)

.                 gen lo =.
(1,782 missing values generated)

.                 gen mhi  =.
(1,782 missing values generated)

.                 gen mlo =.
(1,782 missing values generated)

.                 gen b =.
(1,782 missing values generated)

.                 gen se =.
(1,782 missing values generated)

.                 gen count =_n

.                 gen model = ""
(1,782 missing values generated)

. 
.                 
.                 global count=9                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_personal"                                    
>            /* name of variable of interest to plot */

.                 local mod = "Rob0 Rob1 Rob2 Rob3 Rob4 Rob5 Rob6 Rob8"

.                 foreach md of local mod {
  2.                         global imp ="imp`md'"
  3.                         jwmi
  4.                 }

symmetric beta[1,1]
           c1
r1  .06058665

symmetric se[1,1]
           c1
r1  .01928329
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str7
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05398335

symmetric se[1,1]
           c1
r1  .01962467
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .04885887

symmetric se[1,1]
          c1
r1  .0203296
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05948771

symmetric se[1,1]
           c1
r1  .01934951
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05629241

symmetric se[1,1]
           c1
r1  .01762726
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05824763

symmetric se[1,1]
           c1
r1  .01983393
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06539428

symmetric se[1,1]
           c1
r1  .02553737
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05922753

symmetric se[1,1]
           c1
r1  .01992585
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 global v = "pers"                                            
>    /* name of variable of interest to plot */

.                 global imp ="impRob7"

.                 jwmi

symmetric beta[1,1]
           c1
r1  .05647191

symmetric se[1,1]
           c1
r1  .02540762
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 gen e=round(b,.001)
(1,773 missing values generated)

.         
.                 twoway (scatter count b if count<=10,ylab(1(1)$ac,glcolor(gs1
> 6)) mlab(e) ///
>                 mlabpos(12) xlab(0(.02).1)  mcolor(gs6) msymbol(plus) yscale(
> range(0.75 8.5))  ///
>                 xtitle(Coefficient estimate) xline(0,lpat(dash)))  (rspike hi
>  lo count if count<=9, ///
>                 horizontal ytitle("") title("Robustness tests",size(medium)) 
> subtitle("RE, AR(1)",size(small)) ///
>                 ylab(1 "Add Polcon" 2"Personalism index" 3 "Autocracies only"
>    4 "+ autocratic types" ///
>                 5 "+ other sectoral FDI" 6 "Non-linear time trend" 7 `" "Prim
> . FDI w/out" "GDP denominator" "'  ///
>                 8 "No controls" 9 "Base" )  lcolor(gs6) lwidth(medthin)  lege
> nd(off) scheme(lean2)) ///
>                 (rspike mhi mlo count if count<=9, lwidth(thick) lcolor(gs6) 
> horizontal)

.                 graph export "$dir\golden\OLS-Robust.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\OLS-Robust.pdf written in PDF format)

.                 
.                 ******************
.                 *** Figure A-2 ***
.                 ******************
.                 *** PRS `Law and Order' control with imputed data for 1984-20
> 10 ***
.                 global cvarlist="laworderi allexp gtime lgdpcap lpop lopennes
> s grow incidencev413 meanres ldevelopingfdi asia america easia ssa"

.                 set more off

.                 global m = 10                                                
>                    /* number of imputated data sets, estimates to average */

.  
.                         forval i = 1(1)$m {
  2.                                 import delimited using "$dir\imputed-fdi\l
> aw`i'.csv",clear
  3.                                 qui:sort cow year
  4.                                 qui:merge cow  year using "$dir\temp.dta"
  5.                                 tab _merge
  6.                                 drop _merge
  7.                                 global cvarlist="laworderi allexp gtime lg
> dpcap lpop lopenness grow incidencev413 meanres ldevelopingfdi asia america e
> asia ssa"
  8.                                 qui:tsset cow year
  9.                                 xtserial cub_primaryfdigdp gwf_personal $c
> varlist
 10.                                 qui:xtregar cub_primaryfdigdp gwf_personal
>  $cvarlist, re 
 11.                                 est store primaryAR1RE`i'
 12.                         }
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.752
           Prob > F =      0.1907
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      6.693
           Prob > F =      0.0121
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     22.803
           Prob > F =      0.0000
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     15.120
           Prob > F =      0.0003
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      3.779
           Prob > F =      0.0566
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      7.404
           Prob > F =      0.0085
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.631
           Prob > F =      0.2065
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.950
           Prob > F =      0.1678
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      8.380
           Prob > F =      0.0053
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      9.976
           Prob > F =      0.0025

.                         
.                                 gen hi =.
(3,591 missing values generated)

.                                 gen lo =.
(3,591 missing values generated)

.                                 gen mhi  =.
(3,591 missing values generated)

.                                 gen mlo =.
(3,591 missing values generated)

.                                 gen b =.
(3,591 missing values generated)

.                                 gen se = .
(3,591 missing values generated)

.                                 gen count =_n

.                                 gen model = ""
(3,591 missing values generated)

.                                 gen variable = ""                       
(3,591 missing values generated)

.                                 global count=11                              
>                            /* number of specifications to test */

.                                 global ac = $count

.                                 global imp ="primaryAR1RE"

.                                 local var = "gwf_pers laworderi allexp gtime 
> lgdpcap lpop lopenness grow incidencev413 meanres ldevelopingfdi"

.                                 foreach cvar of local var {
  2.                                                 global v = "`cvar'"       
>                                       /* name of variable of interest to plot
>  */
  3.                                                 qui:replace variable = "$v
> " if count==$count
  4.                                                 jwmi 
  5.                                 }

symmetric beta[1,1]
           c1
r1  .06447912

symmetric se[1,1]
           c1
r1  .02472083
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str12
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00415325

symmetric se[1,1]
           c1
r1  .00539292
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.02492034

symmetric se[1,1]
           c1
r1  .01041195
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .02009905

symmetric se[1,1]
           c1
r1  .00671992
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.03850893

symmetric se[1,1]
           c1
r1  .00902476
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00382538

symmetric se[1,1]
          c1
r1  .0076797
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00658212

symmetric se[1,1]
           c1
r1  .01749989
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
          c1
r1  .0026625

symmetric se[1,1]
           c1
r1  .00118291
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.03112113

symmetric se[1,1]
          c1
r1  .0129622
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01222372

symmetric se[1,1]
         c1
r1  .004705
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01173511

symmetric se[1,1]
           c1
r1  .00568003
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                                 gen e=round(b,.001)
(3,580 missing values generated)

.                                 gen s=round(se,.001)
(3,580 missing values generated)

.                                 browse variable e s hi lo

.                                 
.                                 twoway (scatter count b if count<=11,ylab(1(1
> )$ac,glcolor(gs16)) mlab(e) mlabpos(12) xlab(-.05(.05).1) ///
>                                 mcolor(gs6) msymbol(plus) yscale(range(0.75 1
> 0.25))  xtitle(Coefficient estimate) xline(0,lpat(dash))) ///
>                                 (rspike hi lo count if count<=11, horizontal 
> ytitle("") title(Personalist and Primary FDI,size(medium)) ///
>                                 ylab(1 "Total Developing FDI" 2 "Oil reserves
>  per cap. (log)" 3 "Civil conflict"  ///
>                                 4 "Annual GDP Growth" 5 "Trade (log)" 6 "Popu
> lation (log)" 7 "GDP per cap. (log)" ///
>                                 8 "Regime duration" 9 "Expropriations" 10 "La
> w and order" 11"{bf:Personalist}")  lcolor(gs6) lwidth(medthin) ///
>                                 legend(off) scheme(lean2))

.                                 graph export "$dir\golden\OLS-PRS-LawOrder.pd
> f", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\OLS-PRS-LawOrder.pdf written in PDF format)

. 
. 
.         *****************************************************
.         *** Appendix B: Transformations of the DV ***
.         *****************************************************   
.         import delimited using "$dir\imputed-fdi\primary1.csv",clear
(20 vars, 1,782 obs)

.         qui:sort cow year

.         rename cub_primary cubprimary1

.         save imptemp,replace
(note: file imptemp.dta not found)
file imptemp.dta saved

.         forval i = 2(1)$m {
  2.                 import delimited using "$dir\imputed-fdi\primary`i'.csv",c
> lear
  3.                 qui:sort cow year
  4.                 qui:merge cow year using imptemp
  5.                 qui:drop _merge
  6.                 rename cub_primary cubprimary`i'
  7.                 qui:sort cow year
  8.                 qui:save imptemp,replace
  9.         }
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)

.         sum cubprimary*

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
cubprimary10 |      1,782    .1161315    .1290922  -.3603327   .7780223
 cubprimary9 |      1,782    .1228315     .133534  -.3728345   .7780223
 cubprimary8 |      1,782    .1183557    .1314132  -.3469891   .7780223
 cubprimary7 |      1,782    .1216432    .1304565  -.2907405   .7780223
 cubprimary6 |      1,782    .1174904    .1328993  -.4997088   .7780223
-------------+---------------------------------------------------------
 cubprimary5 |      1,782    .1210858    .1334424  -.3358265   .7780223
 cubprimary4 |      1,782    .1261556    .1313525  -.3274186   .7780223
 cubprimary3 |      1,782    .1234734     .129088  -.3938654   .7780223
 cubprimary2 |      1,782    .1224842    .1302581  -.3679211   .7780223
 cubprimary1 |      1,782    .1159396    .1346635  -.4726563   .7780223

.         qui:merge cow year using "$dir\temp.dta"

.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.         egen cub_primaryfdigdp = rowmean(cubprimary*)
(1813 missing values generated)

.         sum cub*

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
cubprimary10 |      1,782    .1161315    .1290922  -.3603327   .7780223
 cubprimary9 |      1,782    .1228315     .133534  -.3728345   .7780223
 cubprimary8 |      1,782    .1183557    .1314132  -.3469891   .7780223
 cubprimary7 |      1,782    .1216432    .1304565  -.2907405   .7780223
 cubprimary6 |      1,782    .1174904    .1328993  -.4997088   .7780223
-------------+---------------------------------------------------------
 cubprimary5 |      1,782    .1210858    .1334424  -.3358265   .7780223
 cubprimary4 |      1,782    .1261556    .1313525  -.3274186   .7780223
 cubprimary3 |      1,782    .1234734     .129088  -.3938654   .7780223
 cubprimary2 |      1,782    .1224842    .1302581  -.3679211   .7780223
 cubprimary1 |      1,782    .1159396    .1346635  -.4726563   .7780223
-------------+---------------------------------------------------------
cub_Primar~p |        891    .1297055    .1323183  -.2776889   .7780223
cub_Second~p |        891      .14822    .0998088  -.2117882   .4605866
cub_Tertia~p |        891    .1970922    .1135839  -.2202012   .5636367
cub_primar~p |      1,782    .1205591     .112029  -.2776889   .7780223

.         gen primaryfdigdp = (abs(cub_primaryfdigdp))^3
(1,813 missing values generated)

.         gen log_primaryfdigdp = ln(1+abs(primaryfdigdp*100))
(1,813 missing values generated)

.         gen quad_primaryfdigdp = primaryfdigdp^(1/4)
(1,813 missing values generated)

.         local t = "primaryfdigdp log_primaryfdigdp quad_primaryfdigdp"

.         foreach type of local t {
  2.                 replace `type' = `type'*-1 if cub_primaryfdigdp<0
  3.         }
(132 real changes made)
(132 real changes made)
(132 real changes made)

.         swilk primaryfdigdp log_primaryfdigdp cub_primaryfdi quad_primaryfdig
> dp

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.26080    789.278    16.898    0.00000
log_primar~p |      1,782    0.74858    268.456    14.166    0.00000
cub_primar~p |      1,782    0.96539     36.956     9.143    0.00000
quad_prima~p |      1,782    0.97830     23.167     7.960    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.

.         sfrancia primaryfdigdp log_primaryfdigdp cub_primaryfdi quad_primaryf
> digdp,boxcox

                  Shapiro-Francia W' test for normal data

    Variable |       Obs       W'          V'        z       Prob>z
-------------+-----------------------------------------------------
primaryfdi~p |     1,782    0.25851    745.585     9.729    0.00001
log_primar~p |     1,782    0.74760    253.797     8.825    0.00001
cub_primar~p |     1,782    0.96466     35.539     6.641    0.00001
quad_prima~p |     1,782    0.97798     22.142     5.989    0.00001

Note: The normal approximation to the sampling distribution of W'
      is valid for 5<=n<=1000 under the Box-Cox transformation.

.         
.         ******************
.         *** Figure B-1 ***
.         ******************
.         * Histograms *
.         hist primaryfdigdp, bin(75) color(gs1) ytitle("") xtitle(No transform
> ation, size(large)) saving(h1, replace) 
(bin=75, start=-.02141289, width=.00656486)
(note: file h1.gph not found)
(file h1.gph saved)

.         hist log_primaryfdigdp, color(gs5) ytitle("") bin(75) xtitle(Log tran
> sformation, size(large)) saving(h2, replace) 
(bin=75, start=-1.1446334, width=.0669042)
(note: file h2.gph not found)
(file h2.gph saved)

.         hist cub_primaryfdigdp, color(gs9) ytitle("") bin(75) xtitle(Cube roo
> t transformation, size(large)) saving(h3, replace) 
(bin=75, start=-.27768886, width=.01407615)
(file h3.gph saved)

.         hist quad, bin(75) color(gs13) ytitle("") bin(75) xtitle(Quadratic ro
> ot transformation, size(large))  saving(h4, replace) 
(bin=75, start=-.38253295, width=.01614587)
(file h4.gph saved)

.         graph combine h1.gph h2.gph h3.gph h4.gph, col(2) xsize(2) ysize(1.2)
>  scheme(lean2) /// 
>                 l1title("      Density                                     De
> nsity")

.         graph export "$dir\golden\PFDI-Distribution.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\PFDI-Distribution.pdf written in PDF format)

.  
.         ******************
.         *** Figure B-2 ***
.         ******************      * Descriptive Stats, by regime * 
.         cibar primaryfdigdp, over1(allregime) graphopts(saving(f1, replace) t
> itle(No transformation) scheme(lean2) /*
>         */ ytitle(FDI (%GDP)) xlab(1.45 "Democracy" 2.85 "Military" 4.35 "Mon
> archy" 5.8 "Party" /*
>         */ 7.25 "Personal") ylabel(0 (.01) .03,glcolor(gs15)) legend(off)) ba
> rcolor(gs15 gs14 gs13 gs12 gs11) bargap(45)
(note: file f1.gph not found)
(file f1.gph saved)

.         
.         cibar log_primaryfdigdp, over1(allregime) graphopts( saving(f2, repla
> ce) title(Log transformation) scheme(lean2) /*
>         */ ytitle(FDI (%GDP)) xlab(1.45 "Democracy" 2.85 "Military" 4.35 "Mon
> archy" 5.8 "Party" /*
>         */ 7.25 "Personal") ylabel(0 (.2) .8,glcolor(gs15)) legend(off)) barc
> olor(gs15 gs14 gs13 gs12 gs11) bargap(45)
(note: file f2.gph not found)
(file f2.gph saved)

.         
.         cibar cub_primaryfdigdp, over1(allregime) graphopts(saving(f3, replac
> e) title(Cube root) scheme(lean2) /*
>         */ ytitle(FDI (%GDP)) xlab(1.45 "Democracy" 2.85 "Military" 4.35 "Mon
> archy" 5.8 "Party" /*
>         */ 7.25 "Personal") ylabel(0 (.05) .2,glcolor(gs15)) legend(off)) bar
> color(gs15 gs14 gs13 gs12 gs11) bargap(45)
(note: file f3.gph not found)
(file f3.gph saved)

.         
.         cibar quad_primaryfdigdp, over1(allregime) graphopts(saving(f4, repla
> ce) title(Quadratic root) scheme(lean2) /*
>         */ ytitle(FDI (%GDP)) xlab(1.45 "Democracy" 2.85 "Military" 4.35 "Mon
> archy" 5.8 "Party" /*
>         */ 7.25 "Personal") ylabel(0 (.1) .3,glcolor(gs15)) legend(off)) barc
> olor(gs15 gs14 gs13 gs12 gs11) bargap(45)
(note: file f4.gph not found)
(file f4.gph saved)

.         
.         graph combine f1.gph f2.gph f3.gph f4.gph, iscale(.35) col(2) xsize(6
> ) ysize(5)   scheme(lean2) /*
>         */ title("Primary FDI by regime type", pos(6) size(small)) 

.         graph export "$dir\golden\PFDI-Sample.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\PFDI-Sample.pdf written in PDF format)

.         erase imptemp.dta

.         
.         ******************
.         *** Figure B-3 ***
.         ******************
.                 forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:merge cow  year using "$dir\temp.dta"
  5.                         
.                         gen primaryfdigdp = (abs(cub_prim))^3
  6.                         gen log_primaryfdigdp = ln(1+abs(primaryfdigdp))
  7.                         gen quad_primaryfdigdp = primaryfdigdp^(1/4)
  8.                         local t = "primaryfdigdp log_primaryfdigdp quad_pr
> imaryfdigdp"
  9.                         foreach type of local t {
 10.                                 replace `type' = `type'*-1 if cub_prim<0
 11.                         }
 12.                         swilk primaryfdigdp log_primaryfdigdp cub_primaryf
> di quad_primaryfdigdp
 13.         
.                         global cvarlist="allexp gtime lgdpcap lpop lopenness 
> grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
 14.                         tsset cow year
 15.                         * Base: cube root *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist,
>  re   
 16.                         est store impRob0`i'
 17.                         * No transformation *
.                         qui:xtregar primaryfdigdp gwf_personal $cvarlist, re 
>   
 18.                         est store impRob1`i'
 19.                         * Log transformation *
.                         qui:xtregar log_primaryfdigdp gwf_personal $cvarlist,
>  re   
 20.                         est store impRob2`i'
 21.                         * Quadratic root *
.                         qui:xtregar quad_primaryfdigdp gwf_personal $cvarlist
> , re   
 22.                         est store impRob3`i'
 23.                 }
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(247 real changes made)
(247 real changes made)
(247 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.34825    695.905    16.579    0.00000
log_primar~p |      1,782    0.38838    653.055    16.418    0.00000
cub_primar~p |      1,782    0.98684     14.050     6.694    0.00000
quad_prima~p |      1,782    0.98677     14.128     6.708    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(210 real changes made)
(210 real changes made)
(210 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.34249    702.060    16.601    0.00000
log_primar~p |      1,782    0.38210    659.759    16.444    0.00000
cub_primar~p |      1,782    0.98527     15.723     6.979    0.00000
quad_prima~p |      1,782    0.98686     14.031     6.690    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(207 real changes made)
(207 real changes made)
(207 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.33636    708.599    16.624    0.00000
log_primar~p |      1,782    0.37672    665.501    16.465    0.00000
cub_primar~p |      1,782    0.98586     15.094     6.875    0.00000
quad_prima~p |      1,782    0.98681     14.085     6.700    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(205 real changes made)
(205 real changes made)
(205 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.35055    693.448    16.570    0.00000
log_primar~p |      1,782    0.39205    649.134    16.402    0.00000
cub_primar~p |      1,782    0.98838     12.403     6.378    0.00000
quad_prima~p |      1,782    0.98482     16.211     7.056    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(234 real changes made)
(234 real changes made)
(234 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.35154    692.396    16.566    0.00000
log_primar~p |      1,782    0.39125    649.992    16.406    0.00000
cub_primar~p |      1,782    0.98680     14.096     6.702    0.00000
quad_prima~p |      1,782    0.98758     13.263     6.548    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(234 real changes made)
(234 real changes made)
(234 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.34588    698.433    16.588    0.00000
log_primar~p |      1,782    0.38512    656.536    16.431    0.00000
cub_primar~p |      1,782    0.98450     16.546     7.108    0.00000
quad_prima~p |      1,782    0.98835     12.443     6.386    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(216 real changes made)
(216 real changes made)
(216 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.33976    704.974    16.611    0.00000
log_primar~p |      1,782    0.37923    662.826    16.455    0.00000
cub_primar~p |      1,782    0.98497     16.051     7.031    0.00000
quad_prima~p |      1,782    0.98871     12.053     6.305    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(234 real changes made)
(234 real changes made)
(234 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.33740    707.489    16.620    0.00000
log_primar~p |      1,782    0.37719    665.000    16.464    0.00000
cub_primar~p |      1,782    0.98558     15.393     6.925    0.00000
quad_prima~p |      1,782    0.98940     11.315     6.145    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(216 real changes made)
(216 real changes made)
(216 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.35900    684.430    16.537    0.00000
log_primar~p |      1,782    0.39972    640.943    16.370    0.00000
cub_primar~p |      1,782    0.98684     14.047     6.693    0.00000
quad_prima~p |      1,782    0.98738     13.475     6.588    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
(1,813 missing values generated)
(1,813 missing values generated)
(1,813 missing values generated)
(217 real changes made)
(217 real changes made)
(217 real changes made)

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
primaryfdi~p |      1,782    0.32209    723.839    16.678    0.00000
log_primar~p |      1,782    0.36212    681.098    16.524    0.00000
cub_primar~p |      1,782    0.98311     18.030     7.325    0.00000
quad_prima~p |      1,782    0.98525     15.752     6.983    0.00000

Note: The normal approximation to the sampling distribution of W'
      is valid for 4<=n<=2000.
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.                 gen hi =.
(3,595 missing values generated)

.                 gen lo =.
(3,595 missing values generated)

.                 gen mhi  =.
(3,595 missing values generated)

.                 gen mlo =.
(3,595 missing values generated)

.                 gen b =.
(3,595 missing values generated)

.                 gen se =.
(3,595 missing values generated)

.                 gen count =_n

.                 gen model = ""
(3,595 missing values generated)

. 
.                 capture program drop jwmi

.                 program define jwmi
  1.                                 matrix c = J(1,$m,1)                      
>                               /* matrix for obtaining columns sums */        
>  
  2.                                         * Get and store the estimates *
.                                 matrix est = J($m,2,.)                       
>                            /* place to store estimates */
  3.                                 forval i = 1/10{
  4.                                         qui:est restore $imp`i'           
>                               /* get estimate */
  5.                                         qui:nlcom _b[$v],post
  6.                                         matrix beta =e(b)
  7.                                         matrix var = e(V)
  8.                                         matrix est[`i',1]==beta[1,1]
  9.                                         matrix est[`i',2]==var[1,1]
 10.                                 }
 11.                                 matrix colnames est = beta var
 12.                                 *matrix list est                          
>                                               /* show the estimates from test
> s for each imputed data set */
.                                         * Estimate of beta is the mean *
.                                 matrix mean_b = (c*est)/$m                   
>                            /* calculate the mean of b */
 13.                                         * Between variance, Vb *
.                                 matrix cvb = J($m,1,.)
 14.                                 forval i = 1/$m {
 15.                                         matrix x ==est[`i',1]             
>                               /* get the x_i's  */
 16.                                         matrix cvb[`i',1]==(x[1,1]- mean_b
> [1,1])^2  /* squared deviations from mean */
 17.                                 }
 18.                                 matrix  vb = (c*cvb)/($m-1)               
>                       /* sum squares and divide by n-1 */
 19.                                         * Within variance, Vw *
.                                 matrix vw = mean_b[1,2]
 20.                                         *  Total variance *
.                                 matrix tv = vw[1,1] + vb[1,1] + (vb[1,1]/$m)
 21.                                         * Show the MI beta & se *
.                                 matrix beta= mean_b[1,1]
 22.                                 matrix se = sqrt(tv[1,1]) 
 23.                                 matrix list beta
 24.                                 matrix list se
 25.                                         * Store results for graphing
.                                 replace b = beta[1,1] if count==$count
 26.                                 replace se = se[1,1] if count==$count
 27.                                 replace hi =  beta[1,1] + 1.96*se[1,1] if 
> count==$count
 28.                                 replace lo =  beta[1,1] - 1.96*se[1,1] if 
> count==$count
 29.                                 replace mhi =  beta[1,1] + 1.65*se[1,1] if
>  count==$count
 30.                                 replace mlo =  beta[1,1] - 1.65*se[1,1] if
>  count==$count
 31.                                 replace model = "$imp" if count==$count
 32.                                 global count=$count -1
 33.                 end

.                 
.                 global count=4                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_personal"                                    
>            /* name of variable of interest to plot */

.                 local mod = "Rob0 Rob1 Rob2 Rob3"

.                 foreach md of local mod {
  2.                         global imp ="imp`md'"
  3.                         jwmi
  4.                 }

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str7
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01510607

symmetric se[1,1]
           c1
r1  .00386665
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01278607

symmetric se[1,1]
           c1
r1  .00348046
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .08024966

symmetric se[1,1]
           c1
r1  .02633624
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 gen e=round(b,.001)
(3,591 missing values generated)

.                 
.                 twoway (scatter count b if count<=4,ylab(1(1)$ac,glcolor(gs16
> )) mlab(e) ///
>                 mlabpos(12) xlab(0(.05).15)  mcolor(gs6) msymbol(plus) yscale
> (range(0.75 4.5))  ///
>                 xtitle(Coefficient estimate) xline(0,lpat(dash)))  (rspike hi
>  lo count if count<=4, ///
>                 horizontal ytitle("") title("Different FDI transformations",s
> ize(medium)) subtitle("RE, AR(1)",size(small)) ///
>                 ylab(1 "Quadratic root" 2 "Natural log"  3 "No transformation
> " 4 "Base (cube root)" )  lcolor(gs6) lwidth(medthin)  legend(off) scheme(lea
> n2)) ///
>                 (rspike mhi mlo count if count<=4, lwidth(thick) lcolor(gs6) 
> horizontal)

.                 graph export "$dir\golden\OLS-FDI-Distributions.pdf", as(pdf)
>  replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\OLS-FDI-Distributions.pdf written in PDF format
> )

. 
. 
.         *****************************
.         *** Appendix C: Oil data  ***
.         *****************************
.         ******************
.         *** Figure C-1 ***
.         ******************
.         forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:merge cow  year using "$dir\temp.dta"
  5.                         tsset cow year
  6.                         global cvarlist="allexp gtime lgdpcap lpop lopenne
> ss grow incidencev413 ldevelopingfdi asia america easia ssa"
  7.                         * Base *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist 
> meanres, re   
  8.                         est store impRob0`i'
  9.                         * Add oil price *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist 
> meanres oil_price_2000, re   
 10.                         est store impRob1`i'
 11.                         * Lagged 5 oil reserves *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist 
> l5res, re   
 12.                         est store impRob2`i'
 13.                         * Lagged 1 oil reserves *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist 
> l1res, re   
 14.                         est store impRob3`i'
 15.                         * Lagged 5 oil rents *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist 
> oil5, re   
 16.                         est store impRob4`i'
 17.                         * Lagged 1 oil rents *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist 
> oilpc, re   
 18.                         est store impRob5`i'
 19.                         * Lagged 1 total resources *
.                         gen resources = ln(1+(l.total_resources_income_pc)^(1
> /3))
 20.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st resources, re   
 21.                         est store impRob6`i'
 22.                 }
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(596 missing values generated)

.                 gen hi =.
(3,595 missing values generated)

.                 gen lo =.
(3,595 missing values generated)

.                 gen mhi  =.
(3,595 missing values generated)

.                 gen mlo =.
(3,595 missing values generated)

.                 gen b =.
(3,595 missing values generated)

.                 gen se =.
(3,595 missing values generated)

.                 gen count =_n

.                 gen model = ""
(3,595 missing values generated)

.                 
.                 global count=7                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_personal"                                    
>            /* name of variable of interest to plot */

.                 local mod = "Rob0 Rob1 Rob2 Rob3 Rob4 Rob5 Rob6"

.                 foreach md of local mod {
  2.                         global imp ="imp`md'"
  3.                         jwmi
  4.                 }

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str7
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06012803

symmetric se[1,1]
           c1
r1  .01938318
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05964163

symmetric se[1,1]
           c1
r1  .01854078
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06605933

symmetric se[1,1]
          c1
r1  .0198975
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06238616

symmetric se[1,1]
           c1
r1  .01817194
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05900736

symmetric se[1,1]
           c1
r1  .01830408
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06203512

symmetric se[1,1]
         c1
r1  .019047
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 gen e=round(b,.001)
(3,588 missing values generated)

.                 
.                 twoway (scatter count b if count<=7,ylab(1(1)$ac,glcolor(gs16
> )) mlab(e) ///
>                 mlabpos(12) xlab(0(.05).15)  mcolor(gs6) msymbol(plus) yscale
> (range(0.75 7.5))  ///
>                 xtitle(Coefficient estimate) xline(0,lpat(dash)))  (rspike hi
>  lo count if count<=7, ///
>                 horizontal ytitle("") title("Different resource variables",si
> ze(medium)) subtitle("RE, AR(1)",size(small)) ///
>                 ylab(1 "Total resources"2 "Oil rents, lag 1" 3 "Oil rents, la
> g 5" 4 "Reserves, lag 1" 5 "Reserves, lag 5"  6 "+ Oil price" 7 "Base (pre-19
> 80 reserves)" )  lcolor(gs6) lwidth(medthin)  legend(off) scheme(lean2)) ///
>                 (rspike mhi mlo count if count<=7, lwidth(thick) lcolor(gs6) 
> horizontal)

.                 graph export "$dir\golden\OLS-Resource-Variables.pdf", as(pdf
> ) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\OLS-Resource-Variables.pdf written in PDF forma
> t)

. 
. 
.         **************************************************************
.         *** Appendix D: Two-stage diagnostics and Robustness tests ***
.         **************************************************************
.         import delimited using "$dir\imputed-fdi\primary5.csv",clear   /* we 
> aren't modeling imputed FDI in this section, so no need to use 10 mi data set
> s */
(20 vars, 1,782 obs)

.         qui:sort cow year

.         qui:merge cow  year using "$dir\temp.dta"

.         recode inst (.=0)
(inst: 64 changes made)

.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.         global cvarlist="allexp gtime lgdpcap lpop lopenness grow incidencev4
> 13 meanres ldevelopingfdi asia america easia ssa"

.         qui reg cub_primary gwf_personal inst $cvarlist

.         gen s1=e(sample)

.         *** US and Soviet covert intervention data ***
.         gen uscia = 0 if s1==1
(1,813 missing values generated)

.         gen sovietkgb =0 if s1==1
(1,813 missing values generated)

.         replace uscia = 1 if gwf_casename=="Argentina 76-83" | gwf_casename==
> "Colombia 58-NA" | gwf_casename=="Egypt 52-NA" ///
>         | gwf_casename=="Honduras 81-NA" | gwf_casename=="Jordan 46-NA" | gwf
> _casename=="Korea, South 61-87" ///
>         | gwf_casename=="Korea, South 87-NA" | gwf_casename=="Panama 89-NA" |
>  gwf_casename=="Paraguay 54-93"  /// 
>         | gwf_casename=="Saudi Arabia 27-NA"
(215 real changes made)

.         replace sovietkgb = 1 if gwf_casename=="Costa Rica 49-NA" | gwf_casen
> ame=="Egypt 52-NA" | gwf_casename=="Laos 75-NA" 
(96 real changes made)

.         
.         ******************
.         *** Figure D-1 ***
.         ******************
.         *** Instrument strength ***
.         tab gwf_pers inst if s1==1,col

+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

gwf_person |         inst
        al |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,471         74 |     1,545 
           |     88.99      57.36 |     86.70 
-----------+----------------------+----------
         1 |       182         55 |       237 
           |     11.01      42.64 |     13.30 
-----------+----------------------+----------
     Total |     1,653        129 |     1,782 
           |    100.00     100.00 |    100.00 


.         reg gwf_personal inst $cvarlist if s1==1 

      Source |       SS           df       MS      Number of obs   =     1,782
-------------+----------------------------------   F(14, 1767)     =     55.68
       Model |   62.897098        14  4.49264986   Prob > F        =    0.0000
    Residual |    142.5827     1,767  .080691964   R-squared       =    0.3061
-------------+----------------------------------   Adj R-squared   =    0.3006
       Total |  205.479798     1,781  .115373272   Root MSE        =    .28406

------------------------------------------------------------------------------
gwf_personal |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        inst |   .2914838   .0287002    10.16   0.000     .2351939    .3477738
      allexp |   .0487902   .0180313     2.71   0.007     .0134254     .084155
       gtime |   -.040482     .00686    -5.90   0.000    -.0539365   -.0270275
     lgdpcap |  -.0542939   .0086331    -6.29   0.000    -.0712261   -.0373617
        lpop |  -.0817292   .0068894   -11.86   0.000    -.0952415    -.068217
   lopenness |   .0079305   .0188826     0.42   0.675     -.029104    .0449651
        grow |   .0003808   .0012522     0.30   0.761    -.0020751    .0028367
incidenc~413 |   .0674931   .0178254     3.79   0.000      .032532    .1024542
meanreserves |   .0394168   .0040422     9.75   0.000     .0314889    .0473447
ldevelopin~i |   .0224292   .0058931     3.81   0.000     .0108711    .0339873
        asia |   .3438631   .0280895    12.24   0.000      .288771    .3989551
    americas |  -.0147733   .0212793    -0.69   0.488    -.0565086     .026962
       easia |   .0528324   .0283422     1.86   0.062    -.0027553    .1084201
         ssa |    .203305   .0259916     7.82   0.000     .1523274    .2542825
       _cons |   1.514265    .154891     9.78   0.000     1.210476    1.818054
------------------------------------------------------------------------------

.         avplot inst,xtitle(e(Excluded instrument | X)) ytitle(e(Personalist |
>  X))

.         graph export "$dir\golden\Instrument-Strength.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Instrument-Strength.pdf written in PDF format)

.                 
.         ******************
.         *** Figure D-2 ***
.         ******************
.         *** Pre-1980 FDI ***
.         gen ldist = ln(wdistance)
(119 missing values generated)

.         hist pre80fdi if s1==1
(bin=31, start=-2.1172538, width=.20231539)

.         egen caseid = group(gwf_casename) if s1==1
(1877 missing values generated)

.         egen min = min(year) if s1==1,by(caseid)
(1813 missing values generated)

.         egen maxinst = max(inst) if s1==1,by(caseid)
(1813 missing values generated)

.         ttest pre80fdi if s1==1 & min==year,by(maxinst)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      97    1.557033    .1224131     1.20563    1.314045    1.800021
       1 |       7     1.36758    .4096552    1.083846    .3651899     2.36997
---------+--------------------------------------------------------------------
combined |     104    1.544281    .1170743    1.193928    1.312092    1.776471
---------+--------------------------------------------------------------------
    diff |            .1894528    .4691714               -.7411465    1.120052
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   0.4038
Ho: diff = 0                                     degrees of freedom =      102

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.6564         Pr(|T| > |t|) = 0.6872          Pr(T > t) = 0.3436

.         logit maxinst pre80fdi if year==min & s1==1,r

Iteration 0:   log pseudolikelihood = -25.648318  
Iteration 1:   log pseudolikelihood = -25.569258  
Iteration 2:   log pseudolikelihood = -25.568535  
Iteration 3:   log pseudolikelihood = -25.568535  

Logistic regression                             Number of obs     =        104
                                                Wald chi2(1)      =       0.25
                                                Prob > chi2       =     0.6167
Log pseudolikelihood = -25.568535               Pseudo R2         =     0.0031

------------------------------------------------------------------------------
             |               Robust
     maxinst |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    pre80fdi |  -.1265839   .2529142    -0.50   0.617    -.6222867    .3691188
       _cons |  -2.443416   .5292425    -4.62   0.000    -3.480712    -1.40612
------------------------------------------------------------------------------

.         est store pre1

.         logit maxinst pre80fdi lgdpcap lpop ldist meanres  if year==min & s1=
> =1,r

Iteration 0:   log pseudolikelihood = -25.648318  
Iteration 1:   log pseudolikelihood = -22.854979  
Iteration 2:   log pseudolikelihood = -20.713803  
Iteration 3:   log pseudolikelihood = -20.680505  
Iteration 4:   log pseudolikelihood = -20.680437  
Iteration 5:   log pseudolikelihood = -20.680437  

Logistic regression                             Number of obs     =        104
                                                Wald chi2(5)      =      11.15
                                                Prob > chi2       =     0.0485
Log pseudolikelihood = -20.680437               Pseudo R2         =     0.1937

------------------------------------------------------------------------------
             |               Robust
     maxinst |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    pre80fdi |   .2669365    .290988     0.92   0.359    -.3033896    .8372625
     lgdpcap |  -.9067762   .5990897    -1.51   0.130     -2.08097    .2674179
        lpop |  -.0696611   .2334396    -0.30   0.765    -.5271942    .3878721
       ldist |   1.130999   .8637487     1.31   0.190    -.5619177    2.823915
meanreserves |   .6774476   .2845291     2.38   0.017     .1197808    1.235114
       _cons |  -1.893018   5.853277    -0.32   0.746    -13.36523    9.579195
------------------------------------------------------------------------------

.         est store pre2

.         logit maxinst pre80fdi lgdpcap lpop ldist oil5pc  if year==min & s1==
> 1,r

Iteration 0:   log pseudolikelihood = -25.648318  
Iteration 1:   log pseudolikelihood =   -24.1345  
Iteration 2:   log pseudolikelihood = -23.887641  
Iteration 3:   log pseudolikelihood = -23.887347  
Iteration 4:   log pseudolikelihood = -23.887347  

Logistic regression                             Number of obs     =        104
                                                Wald chi2(5)      =       6.64
                                                Prob > chi2       =     0.2488
Log pseudolikelihood = -23.887347               Pseudo R2         =     0.0687

------------------------------------------------------------------------------
             |               Robust
     maxinst |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    pre80fdi |    .034585   .3654627     0.09   0.925    -.6817088    .7508788
     lgdpcap |  -.3933937   .5442034    -0.72   0.470    -1.460013    .6732254
        lpop |   .0304585   .2021423     0.15   0.880    -.3657331      .42665
       ldist |   .7267384   .7671623     0.95   0.343    -.7768721    2.230349
      oil5pc |   .2505929   .1976929     1.27   0.205    -.1368782    .6380639
       _cons |  -4.381337   5.919629    -0.74   0.459     -15.9836    7.220923
------------------------------------------------------------------------------

.         est store pre3

.         krls inst pre80fdi lgdpcap lpop meanres ldist if year==min & s1==1,d(
> d)
Iteration =  1, Looloss: 26.08835  

Pointwise Derivatives                                      Number of obs =     
>  104 
                                                           Lambda        =    6
> 8.77 
                                                           Tolerance     =     
> .104 
                                                           Sigma         =     
>    5 
                                                           Eff. df       =    1
> .278 
                                                           R2            =   .0
> 2226 
                                                           Looloss       =    2
> 6.02

         inst |      Avg.       SE        t    P>|t|        P25       P50      
>  P75       
--------------+----------------------------------------------------------------
> ----
     pre80fdi | -.000063   .001418   -0.045    0.964    -.00116  -.000561   .00
> 0886  
      lgdpcap | -.001839   .001816   -1.013    0.314   -.003617  -.001421  -.00
> 0484  
         lpop |  .001095   .001435    0.763    0.447   -.000509   .001478   .00
> 2281  
 meanreserves |  .000917   .000932    0.983    0.328    .000055   .000506   .00
> 1324  
        ldist |  .002979   .004335    0.687    0.494   -.000245   .002961   .00
> 5999  
--------------+----------------------------------------------------------------
> ----


.         hist d_mean
(bin=10, start=-.00102661, width=.00053036)

.         twoway lpolyci d_mean lgdpcap

.         drop d_*

.         label var pre80fdi "{bf:Pre-1980 FDI}"

.         label var ldist `" "Distance    " "to 20 richest " "economies (log)" 
> "'

.         label var oil5pc `" "Oil rents " "{it:t-5}, (log) " "'

.         label var meanreserves `" "Oil reserves " "pre-1980 (log)" "'

.         label var lgdpcap  `" "GDP per cap." "(log)      " "'

.         label var lpop  `" "Population" "(log)    " "'

. 
.         cibar pre80fdi if s1==1 & min==year,over1(maxinst) barcolor(gs13 gs10
> ) bargap(45) ///
>         graphopts(xlab(1.45 "Unified seizure" 2.85 "Divided seizure") ytitle(
> "Mean level of Total FDI, % GDP", height(3)) ///
>         ylabel(0 (.5) 2,glcolor(gs15)) xscale(range (0.75 3.7)) legend(off) s
> cheme(lean2) title("Pre-1980 FDI",size(medsmall)) saving(h1.gph,replace) ///
>         graphr(margin(1 1 9 1)))
(file h1.gph saved)

.         coefplot (pre1, msymbol(D)) (pre2, msymbol(T)) (pre3, msymbol(Oh)), t
> itle("Pre-1980 FDI and Divided Seizure")/*
>         */ scheme(lean2) drop(_cons) order(pre80fdi lgdp lgdpcap lpop lopenne
> ss) scale(.75) xlab(-1(.5) 1.5)/*
>         */ xline(0, lpattern(dash)) grid(glcolor(gs15)) mfcolor(white)   /*
>         */ legend(label(3 "Bivariate") label(6 "Structural") label(9 "Oil ren
> ts") pos(8) ring(0) col(1))  /*
>         */ levels(95 90) xtitle("  Coefficient estimate", height(3)) saving(h
> 2.gph,replace)   
(file h2.gph saved)

.         graph combine h1.gph h2.gph, xsize(3.5) ysize(2) rows(1)

.         graph export "$dir\golden\Pre80-FDI.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Pre80-FDI.pdf written in PDF format)

.         drop min caseid

. 
.         
.         ******************
.         *** Figure D-3 ***
.         ******************
.         *** Robustness tests with IV ***  
.                 forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:save temp_primary,replace
  5.                         import delimited using "$dir\imputed-fdi\secondary
> `i'.csv",clear
  6.                         qui:sort cow year
  7.                         qui:save temp_secondary,replace
  8.                         import delimited using "$dir\imputed-fdi\tertiary`
> i'.csv",clear
  9.                         qui:sort cow year
 10.                         merge cow year using temp_primary
 11.                         qui:drop _merge
 12.                         qui:sort cow year
 13.                         merge cow year using temp_secondary
 14.                         qui:rename _merge sector_merge
 15.                         qui: sort cow year
 16.                         qui:merge cow  year using "$dir\temp.dta"
 17.                         qui:keep if sector_merge==3
 18.                         gen primaryfdigdp = (abs(cub_prim))^3
 19.                         gen quad_primaryfdigdp = primaryfdigdp^(1/4)
 20.                         replace quad = quad*-1 if cub_primary<0
 21.                         recode inst (.=0)
 22. 
.                         gen time  = year-1979
 23.                         gen time2 = time^2
 24.                         gen time3 = time^3
 25.                         
.                         *** US and Soviet covert intervention data ***
.                         gen uscia = 0 
 26.                         gen sovietkgb =0
 27.                         replace uscia = 1 if gwf_casename=="Argentina 76-8
> 3" | gwf_casename=="Colombia 58-NA" | gwf_casename=="Egypt 52-NA" ///
>                         | gwf_casename=="Honduras 81-NA" | gwf_casename=="Jor
> dan 46-NA" | gwf_casename=="Korea, South 61-87" ///
>                         | gwf_casename=="Korea, South 87-NA" | gwf_casename==
> "Panama 89-NA" | gwf_casename=="Paraguay 54-93"  /// 
>                         | gwf_casename=="Saudi Arabia 27-NA"
 28.                         replace sovietkgb = 1 if gwf_casename=="Costa Rica
>  49-NA" | gwf_casename=="Egypt 52-NA" | gwf_casename=="Laos 75-NA"
 29.         
.                         global cvarlist="allexp gtime lgdpcap lpop lopenness 
> grow incidencev413  ldevelopingfdi"
 30.                         tsset cow year
 31.                         * Base *
.                         qui:xtivreg2 cub_primaryfdigdp (gwf_personal=inst) $c
> varlist, fe bw(2) rob  
 32.                         est store impRob0`i'
 33.                         * Add other seizure types *
.                         qui:xtivreg2 cub_primaryfdigdp (gwf_personal=inst)sei
> zure_coup seizure_reb seizure_foreign $cvarlist, fe bw(2) rob 
 34.                         est store impRob1`i'
 35.                         * Add cia/soviet interventions *
.                         qui:xtivreg2 cub_primaryfdigdp (gwf_personal=inst) us
> cia sovietkgb $cvarlist, fe bw(2) rob 
 36.                         est store impRob2`i'
 37.                         * Fewer controls *
.                         qui:xtivreg2 cub_primaryfdigdp (gwf_personal=inst) al
> lexp gtime, fe bw(2) rob   
 38.                         est store impRob3`i'
 39.                         * Quad not cub DV transformation *
.                         qui:xtivreg2 quad_primaryfdigdp (gwf_personal=inst) $
> cvarlist, fe bw(2) rob  
 40.                         est store impRob4`i'
 41.                         * Non-linear time trend *
.                         qui:xtivreg2 cub_primaryfdigdp (gwf_personal=inst) ti
> me* $cvarlist, fe bw(2) rob   
 42.                         est store impRob5`i'
 43.                         * Other regime types
.                         qui:xtivreg2 cub_primaryfdigdp (gwf_personal=inst) gw
> f_monarchy gwf_mil gwf_party $cvarlist, fe bw(2) rob  
 44.                         est store impRob6`i'
 45.                         * Add Polcon
.                         qui:xtivreg2 cub_primaryfdigdp (gwf_personal=inst) $c
> varlist lpolcon, fe bw(2) rob  
 46.                         est store impRob7`i'
 47.                         * Personalism index *
.                         qui:xtivreg2 cub_primaryfdigdp (pers=inst) $cvarlist,
>  fe bw(2) rob  
 48.                         est store impRob8`i'
 49.                 }
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(247 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(210 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(207 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(205 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(234 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(234 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(216 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(234 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(216 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(217 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

.                 gen hi =.
(1,782 missing values generated)

.                 gen lo =.
(1,782 missing values generated)

.                 gen mhi  =.
(1,782 missing values generated)

.                 gen mlo =.
(1,782 missing values generated)

.                 gen b =.
(1,782 missing values generated)

.                 gen se =.
(1,782 missing values generated)

.                 gen count =_n

.                 gen model = ""
(1,782 missing values generated)

. 
.                 capture program drop jwmi

.                 program define jwmi
  1.                                 matrix c = J(1,$m,1)                      
>                               /* matrix for obtaining columns sums */        
>  
  2.                                         * Get and store the estimates *
.                                 matrix est = J($m,2,.)                       
>                            /* place to store estimates */
  3.                                 forval i = 1/10{
  4.                                         qui:est restore $imp`i'           
>                               /* get estimate */
  5.                                         qui:nlcom _b[$v],post
  6.                                         matrix beta =e(b)
  7.                                         matrix var = e(V)
  8.                                         matrix est[`i',1]==beta[1,1]
  9.                                         matrix est[`i',2]==var[1,1]
 10.                                 }
 11.                                 matrix colnames est = beta var
 12.                                 *matrix list est                          
>                                               /* show the estimates from test
> s for each imputed data set */
.                                         * Estimate of beta is the mean *
.                                 matrix mean_b = (c*est)/$m                   
>                            /* calculate the mean of b */
 13.                                         * Between variance, Vb *
.                                 matrix cvb = J($m,1,.)
 14.                                 forval i = 1/$m {
 15.                                         matrix x ==est[`i',1]             
>                               /* get the x_i's  */
 16.                                         matrix cvb[`i',1]==(x[1,1]- mean_b
> [1,1])^2  /* squared deviations from mean */
 17.                                 }
 18.                                 matrix  vb = (c*cvb)/($m-1)               
>                       /* sum squares and divide by n-1 */
 19.                                         * Within variance, Vw *
.                                 matrix vw = mean_b[1,2]
 20.                                         *  Total variance *
.                                 matrix tv = vw[1,1] + vb[1,1] + (vb[1,1]/$m)
 21.                                         * Show the MI beta & se *
.                                 matrix beta= mean_b[1,1]
 22.                                 matrix se = sqrt(tv[1,1]) 
 23.                                 matrix list beta
 24.                                 matrix list se
 25.                                         * Store results for graphing
.                                 replace b = beta[1,1] if count==$count
 26.                                 replace se = se[1,1] if count==$count
 27.                                 replace hi =  beta[1,1] + 1.96*se[1,1] if 
> count==$count
 28.                                 replace lo =  beta[1,1] - 1.96*se[1,1] if 
> count==$count
 29.                                 replace mhi =  beta[1,1] + 1.65*se[1,1] if
>  count==$count
 30.                                 replace mlo =  beta[1,1] - 1.65*se[1,1] if
>  count==$count
 31.                                 replace model = "$imp" if count==$count
 32.                                 global count=$count -1
 33.                 end

.                 global count=8                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_personal"                                    
>            /* name of variable of interest to plot */

.                 local mod = "Rob0 Rob1 Rob2 Rob3 Rob4 Rob5 Rob6 Rob7"

.                 foreach md of local mod {
  2.                         global imp ="imp`md'"
  3.                         jwmi
  4.                 }

symmetric beta[1,1]
           c1
r1  .06816483

symmetric se[1,1]
           c1
r1  .04020595
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str7
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06319674

symmetric se[1,1]
           c1
r1  .03777775
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06816879

symmetric se[1,1]
           c1
r1  .04019884
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06583773

symmetric se[1,1]
           c1
r1  .03847227
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .09361209

symmetric se[1,1]
           c1
r1  .05817215
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06204987

symmetric se[1,1]
           c1
r1  .04020864
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06328422

symmetric se[1,1]
           c1
r1  .03854583
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06842425

symmetric se[1,1]
           c1
r1  .04115349
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 global v = "pers"                                            
>    /* name of variable of interest to plot */

.                 global imp ="impRob8"

.                 jwmi

symmetric beta[1,1]
          c1
r1  .0970488

symmetric se[1,1]
           c1
r1  .05939639
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

.                 gen e=round(b,.001)
(1,774 missing values generated)

.         
.                 twoway (scatter count b if count<=9,ylab(1(1)$ac,glcolor(gs16
> )) mlab(e) ///
>                 mlabpos(12) xlab(0(.05).15)  mcolor(gs6) msymbol(plus) yscale
> (range(0.75 9.5))  ///
>                 xtitle(Coefficient estimate) xline(0,lpat(dash)))  (rspike hi
>  lo count if count<=9, ///
>                 horizontal ytitle("") title("IV-2SLS tests",size(medium)) sub
> title("FE, HAC errors",size(small)) ///
>                 ylab(1 "Personalism index" 2 "Add Polcon" 3"+ Other regime ty
> pes" 4 "Non-linear time trend" ///
>                 5 "Quadratic root DV" 6 "Fewer controls" 7 `" "+ Foreign" "in
> terventions" "'  ///
>                 8 "+ Seizure types" 9 "Base")  lcolor(gs6) lwidth(medthin)  l
> egend(off) scheme(lean2)) ///
>                 (rspike mhi mlo count if count<=9, lwidth(thick) lcolor(gs6) 
> horizontal saving(h1.gph,replace))
(file h1.gph saved)

.                         
.                         
.                 forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:save temp_primary,replace
  5.                         import delimited using "$dir\imputed-fdi\secondary
> `i'.csv",clear
  6.                         qui:sort cow year
  7.                         qui:save temp_secondary,replace
  8.                         import delimited using "$dir\imputed-fdi\tertiary`
> i'.csv",clear
  9.                         qui:sort cow year
 10.                         merge cow year using temp_primary
 11.                         qui:drop _merge
 12.                         qui:sort cow year
 13.                         merge cow year using temp_secondary
 14.                         qui:rename _merge sector_merge
 15.                         qui: sort cow year
 16.                         qui:merge cow  year using "$dir\temp.dta"
 17.                         qui:keep if sector_merge==3
 18.                         gen primaryfdigdp = (abs(cub_prim))^3
 19.                         gen quad_primaryfdigdp = primaryfdigdp^(1/4)
 20.                         replace quad = quad*-1 if cub_primary<0
 21.                         recode inst (.=0)
 22. 
.                         gen time  = year-1979
 23.                         gen time2 = time^2
 24.                         gen time3 = time^3
 25.                         
.                         *** US and Soviet covert intervention data ***
.                         gen uscia = 0 
 26.                         gen sovietkgb =0
 27.                         replace uscia = 1 if gwf_casename=="Argentina 76-8
> 3" | gwf_casename=="Colombia 58-NA" | gwf_casename=="Egypt 52-NA" ///
>                         | gwf_casename=="Honduras 81-NA" | gwf_casename=="Jor
> dan 46-NA" | gwf_casename=="Korea, South 61-87" ///
>                         | gwf_casename=="Korea, South 87-NA" | gwf_casename==
> "Panama 89-NA" | gwf_casename=="Paraguay 54-93"  /// 
>                         | gwf_casename=="Saudi Arabia 27-NA"
 28.                         replace sovietkgb = 1 if gwf_casename=="Costa Rica
>  49-NA" | gwf_casename=="Egypt 52-NA" | gwf_casename=="Laos 75-NA"
 29.         
.                         global cvarlist="allexp gtime lgdpcap lpop lopenness 
> grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
 30.                         tsset cow year
 31.                         * Base *
.                         qui:xtivreg cub_primaryfdigdp (gwf_personal=inst) $cv
> arlist,re vce(cluster cow) ec
 32.                         est store impRob0`i'
 33.                         * Add other seizure types *
.                         qui:xtivreg cub_primaryfdigdp (gwf_personal=inst)seiz
> ure_coup seizure_reb seizure_foreign $cvarlist,re vce(cluster cow)   ec
 34.                         est store impRob1`i'
 35.                         * Add cia/soviet interventions *
.                         qui:xtivreg cub_primaryfdigdp (gwf_personal=inst) usc
> ia sovietkgb $cvarlist,re vce(cluster cow)  ec
 36.                         est store impRob2`i'
 37.                         * Fewer controls *
.                         qui:xtivreg cub_primaryfdigdp (gwf_personal=inst) all
> exp gtime,re vce(cluster cow)    ec
 38.                         est store impRob3`i'
 39.                         * Quad not cub DV transformation *
.                         qui:xtivreg quad_primaryfdigdp (gwf_personal=inst) $c
> varlist,re vce(cluster cow)  ec
 40.                         est store impRob4`i'
 41.                         * Non-linear time trend *
.                         qui:xtivreg cub_primaryfdigdp (gwf_personal=inst) tim
> e* $cvarlist, re vce(cluster cow)   ec
 42.                         est store impRob5`i'
 43.                         * Other regime types
.                         qui:xtivreg cub_primaryfdigdp (gwf_personal=inst) gwf
> _monarchy gwf_mil gwf_party $cvarlist,re vce(cluster cow)  ec
 44.                         est store impRob6`i'
 45.                         * Add Polcon *
.                         qui:xtivreg cub_primaryfdigdp (gwf_pers=inst) $cvarli
> st lpolcon,re vce(cluster cow)  ec
 46.                         est store impRob7`i'
 47.                         * Personalism index *
.                         qui:xtivreg cub_primaryfdigdp (pers=inst) $cvarlist,r
> e vce(cluster cow)  ec
 48.                         est store impRob8`i'
 49. 
.                 }
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(247 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(210 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(207 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(205 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(234 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(234 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(216 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(234 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(216 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(20 vars, 1,782 obs)
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: you are using old merge syntax; see [D] merge for new syntax)
(217 real changes made)
(inst: 64 changes made)
(208 real changes made)
(93 real changes made)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

.                 gen hi =.
(1,782 missing values generated)

.                 gen lo =.
(1,782 missing values generated)

.                 gen mhi  =.
(1,782 missing values generated)

.                 gen mlo =.
(1,782 missing values generated)

.                 gen b =.
(1,782 missing values generated)

.                 gen se =.
(1,782 missing values generated)

.                 gen count =_n

.                 gen model = ""
(1,782 missing values generated)

. 
.                 
.                 global count=9                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_personal"                                    
>            /* name of variable of interest to plot */

.                 local mod = "Rob0 Rob1 Rob2 Rob3 Rob4 Rob5 Rob6 Rob7"

.                 foreach md of local mod {
  2.                         global imp ="imp`md'"
  3.                         jwmi
  4.                 }

symmetric beta[1,1]
           c1
r1  .06473256

symmetric se[1,1]
           c1
r1  .03438358
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str7
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06722999

symmetric se[1,1]
           c1
r1  .03119789
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06407521

symmetric se[1,1]
           c1
r1  .03530265
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
          c1
r1  .0813715

symmetric se[1,1]
           c1
r1  .03556989
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .09035068

symmetric se[1,1]
           c1
r1  .04520805
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05826663

symmetric se[1,1]
           c1
r1  .03433839
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06011218

symmetric se[1,1]
           c1
r1  .03148337
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06959847

symmetric se[1,1]
           c1
r1  .03591083
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 global v = "pers"                                            
>    /* name of variable of interest to plot */

.                 global imp ="impRob8"

.                 jwmi

symmetric beta[1,1]
           c1
r1  .10606883

symmetric se[1,1]
          c1
r1  .0681626
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 gen e=round(b,.001)
(1,773 missing values generated)

.         
.                 twoway (scatter count b if count<=9,ylab(1(1)$ac,glcolor(gs16
> )) mlab(e) ///
>                 mlabpos(12) xlab(0(.05).15)  mcolor(gs6) msymbol(plus) yscale
> (range(0.75 9.5))  ///
>                 xtitle(Coefficient estimate) xline(0,lpat(dash)))  (rspike hi
>  lo count if count<=9, ///
>                 horizontal ytitle("") title("IV-2SLS tests",size(medium)) sub
> title("RE, cluster errors",size(small)) ///
>                 ylab(1 "Personalism index" 2 "Add Polcon" 3 "+ Other regime t
> ypes"   4 "Non-linear time trend" ///
>                 5 "Quadratic root DV" 6 "Fewer controls" 7 `" "+ Foreign" "in
> terventions" "'  ///
>                 8 "+ Seizure types" 9 "Base" )  lcolor(gs6) lwidth(medthin)  
> legend(off) scheme(lean2)) ///
>                 (rspike mhi mlo count if count<=9, lwidth(thick) lcolor(gs6) 
> horizontal saving(h2.gph,replace))
(file h2.gph saved)

.                 
.                 gr combine h2.gph  h1.gph 

.                 graph export "$dir\golden\2SLS-Robust.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\2SLS-Robust.pdf written in PDF format)

.                 
.                 
.                 ******************
.                 *** Figure D-4 ***
.                 ******************
.                 *** PRS `Law and Order' control ***
.                 global cvarlist="laworderi allexp gtime lgdpcap lpop lopennes
> s grow incidencev413 meanres ldevelopingfdi asia america easia ssa"

.                 set more off

.                 global m = 10                                                
>                    /* number of imputated data sets, estimates to average */

.  
.                         forval i = 1(1)$m {
  2.                                 import delimited using "$dir\imputed-fdi\l
> aw`i'.csv",clear
  3.                                 qui:sort cow year
  4.                                 qui:merge cow  year using "$dir\temp.dta"
  5.                                 tab _merge
  6.                                 drop _merge
  7.                                 global cvarlist="laworderi allexp gtime lg
> dpcap lpop lopenness grow incidencev413 meanres ldevelopingfdi asia america e
> asia ssa"
  8.                                 qui:tsset cow year
  9.                                 xtserial cub_primaryfdigdp gwf_pers $cvarl
> ist
 10.                                 qui:xtivreg cub_primaryfdigdp (gwf_pers=in
> st) $cvarlist,re vce(cluster cow)   ec 
 11.                                 est store primaryAR1RE`i'
 12.                         }
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.752
           Prob > F =      0.1907
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      6.693
           Prob > F =      0.0121
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     22.803
           Prob > F =      0.0000
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =     15.120
           Prob > F =      0.0003
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      3.779
           Prob > F =      0.0566
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      7.404
           Prob > F =      0.0085
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.631
           Prob > F =      0.2065
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      1.950
           Prob > F =      0.1678
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      8.380
           Prob > F =      0.0053
(21 vars, 1,574 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         60        1.67        1.67
          2 |      2,017       56.17       57.84
          3 |      1,514       42.16      100.00
------------+-----------------------------------
      Total |      3,591      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      60) =      9.976
           Prob > F =      0.0025

.                         
.                                 gen hi =.
(3,591 missing values generated)

.                                 gen lo =.
(3,591 missing values generated)

.                                 gen mhi  =.
(3,591 missing values generated)

.                                 gen mlo =.
(3,591 missing values generated)

.                                 gen b =.
(3,591 missing values generated)

.                                 gen se = .
(3,591 missing values generated)

.                                 gen count =_n

.                                 gen model = ""
(3,591 missing values generated)

.                                 gen variable = ""                       
(3,591 missing values generated)

.                                 global count=11                              
>                            /* number of specifications to test */

.                                 global ac = $count

.                                 global imp ="primaryAR1RE"

.                                 local var = "gwf_pers laworderi allexp gtime 
> lgdpcap lpop lopenness grow incidencev413 meanres ldevelopingfdi"

.                                 foreach cvar of local var {
  2.                                                 global v = "`cvar'"       
>                                       /* name of variable of interest to plot
>  */
  3.                                                 qui:replace variable = "$v
> " if count==$count
  4.                                                 jwmi 
  5.                                 }

symmetric beta[1,1]
           c1
r1  .06502916

symmetric se[1,1]
           c1
r1  .03792657
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str12
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00469043

symmetric se[1,1]
          c1
r1  .0058524
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.03023805

symmetric se[1,1]
           c1
r1  .02236198
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .02112302

symmetric se[1,1]
           c1
r1  .00812864
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.04753255

symmetric se[1,1]
           c1
r1  .01365656
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00324139

symmetric se[1,1]
           c1
r1  .00855494
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00724851

symmetric se[1,1]
           c1
r1  .01812758
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00302404

symmetric se[1,1]
           c1
r1  .00124225
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.03495988

symmetric se[1,1]
           c1
r1  .01584908
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01318726

symmetric se[1,1]
           c1
r1  .00703007
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01160054

symmetric se[1,1]
           c1
r1  .00645957
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                                 gen e=round(b,.001)
(3,580 missing values generated)

.                                 gen s=round(se,.001)
(3,580 missing values generated)

.                                 browse variable e s hi lo

.                                 
.                                 twoway (scatter count b if count<=11,ylab(1(1
> )$ac,glcolor(gs16)) mlab(e) mlabpos(12) xlab(-.05(.05).1) ///
>                                 mcolor(gs6) msymbol(plus) yscale(range(0.75 1
> 1.25))  xtitle(Coefficient estimate) xline(0,lpat(dash))) ///
>                                 (rspike hi lo count if count<=11, horizontal 
> ytitle("") title(Personalist and Primary FDI,size(medium)) ///
>                                 ylab(1 "Total Developing FDI" 2 "Oil reserves
>  per cap. (log)" 3 "Civil conflict"  ///
>                                 4 "Annual GDP Growth" 5 "Trade (log)" 6 "Popu
> lation (log)" 7 "GDP per cap. (log)" ///
>                                 8 "Regime duration" 9 "Expropriations" 10 "La
> w and order" 11"{bf:Personalist}")  lcolor(gs6) lwidth(medthin) ///
>                                 legend(off) scheme(lean2))

.                                 graph export "$dir\golden\2SLS-PRS-LawOrder.p
> df", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\2SLS-PRS-LawOrder.pdf written in PDF format)

. 
.         ***********************************************
.         *** Appendix E: Outlier and Influence tests ***
.         ***********************************************
.         ******************
.         *** Figure E-1 ***
.         ******************
.         forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:merge cow  year using "$dir\temp.dta"
  5.                         tsset cow year
  6.                         global cvarlist="allexp gtime lgdpcap lpop lopenne
> ss grow incidencev413 meanres ldevelopingfdi asia america easia ssa"         
>  
  7.                         * Outliers *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist,
>  re   
  8.                         est store impRob0`i'
  9.                         qui:fit cub_primaryfdigdp gwf_pers $cvarlist if e(
> sample)==1
 10.                         hinflu Hi 
 11.                         centile Hi,centile(99.9 99.75 99.5)
 12.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if Hi<r(c_1), re
 13.                         est store impRob1`i'
 14.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if Hi<r(c_2), re
 15.                         est store impRob2`i'
 16.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if Hi<r(c_3), re
 17.                         est store impRob3`i'
 18.                         qui:bacon cub_primaryfdigdp gwf_pers $cvarlist, ge
> n(outbacon) p(.9)
 19.                         bysort outbacon: sum Hi
 20.                         tab gwf_country if outbacon==1
 21.                         qui:xtregar cub_primaryfdigdp gwf_pers $cvarlist i
> f outbacon==0, re
 22.                         est store impRob4`i'
 23.                         drop outbacon Hi
 24.                 }
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .1892222        .1528786    .2590832*
             |                99.75    .1563423        .1190002    .2358408
             |                 99.5    .1230326        .0940755    .1570482

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,763    .0163884      .01471   .0028153   .1571849

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         19    .0793485    .0619216    .021471   .2590832

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
               Armenia |          1        5.26        5.26
            Azerbaijan |          2       10.53       15.79
                Brazil |          1        5.26       21.05
              Ethiopia |          1        5.26       26.32
             Indonesia |          1        5.26       31.58
                  Iran |          1        5.26       36.84
            Kazakhstan |          2       10.53       47.37
            Madagascar |          1        5.26       52.63
            Mozambique |          2       10.53       63.16
             Nicaragua |          2       10.53       73.68
                Russia |          1        5.26       78.95
             Venezuela |          4       21.05      100.00
-----------------------+-----------------------------------
                 Total |         19      100.00
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .2011757        .1534698    .2767342*
             |                99.75     .160507        .1241473    .2515962
             |                 99.5    .1257317         .101146    .1639112

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,704    .0161153     .014901    .002756   .1645706

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         78    .0377361    .0429682   .0070975   .2767342

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
             Argentina |          3        4.00        4.00
               Armenia |          1        1.33        5.33
            Azerbaijan |          3        4.00        9.33
            Bangladesh |          1        1.33       10.67
               Bolivia |          4        5.33       16.00
                Brazil |          2        2.67       18.67
              Cambodia |          2        2.67       21.33
                 China |          2        2.67       24.00
            Costa Rica |          2        2.67       26.67
         Dominican Rep |          1        1.33       28.00
               Ecuador |          3        4.00       32.00
                 Egypt |          3        4.00       36.00
           El Salvador |          1        1.33       37.33
              Ethiopia |          2        2.67       40.00
              Honduras |          1        1.33       41.33
             Indonesia |          3        4.00       45.33
                  Iran |          2        2.67       48.00
            Kazakhstan |          5        6.67       54.67
            Kyrgyzstan |          1        1.33       56.00
            Madagascar |          2        2.67       58.67
                Mexico |          1        1.33       60.00
            Mozambique |          3        4.00       64.00
             Nicaragua |          5        6.67       70.67
               Nigeria |          1        1.33       72.00
              Pakistan |          2        2.67       74.67
                Panama |          1        1.33       76.00
                  Peru |          3        4.00       80.00
           Philippines |          2        2.67       82.67
                Russia |          3        4.00       86.67
             Sri Lanka |          2        2.67       89.33
             Venezuela |          7        9.33       98.67
                Zambia |          1        1.33      100.00
-----------------------+-----------------------------------
                 Total |         75      100.00
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .2336937        .1593943    .2704738*
             |                99.75    .1662364         .130957    .2582372
             |                 99.5    .1339473        .1045134    .1662651

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,704    .0161473    .0150815   .0026704   .1662706

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         78    .0371281    .0449738   .0073662   .2704738

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
             Argentina |          3        4.00        4.00
               Armenia |          1        1.33        5.33
            Azerbaijan |          3        4.00        9.33
            Bangladesh |          1        1.33       10.67
               Bolivia |          4        5.33       16.00
                Brazil |          2        2.67       18.67
              Cambodia |          2        2.67       21.33
                 China |          2        2.67       24.00
            Costa Rica |          2        2.67       26.67
         Dominican Rep |          1        1.33       28.00
               Ecuador |          3        4.00       32.00
                 Egypt |          3        4.00       36.00
           El Salvador |          1        1.33       37.33
              Ethiopia |          2        2.67       40.00
              Honduras |          1        1.33       41.33
             Indonesia |          3        4.00       45.33
                  Iran |          2        2.67       48.00
            Kazakhstan |          5        6.67       54.67
            Kyrgyzstan |          1        1.33       56.00
            Madagascar |          2        2.67       58.67
                Mexico |          1        1.33       60.00
            Mozambique |          3        4.00       64.00
             Nicaragua |          5        6.67       70.67
               Nigeria |          1        1.33       72.00
              Pakistan |          2        2.67       74.67
                Panama |          1        1.33       76.00
                  Peru |          3        4.00       80.00
           Philippines |          2        2.67       82.67
                Russia |          3        4.00       86.67
             Sri Lanka |          2        2.67       89.33
             Venezuela |          7        9.33       98.67
                Zambia |          1        1.33      100.00
-----------------------+-----------------------------------
                 Total |         75      100.00
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .1938379        .1504783    .2678788*
             |                99.75    .1536233         .115333    .2432457
             |                 99.5    .1189039        .0957189    .1540352

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,763    .0164066    .0144614   .0028309    .154115

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         19    .0775589    .0643726   .0221608   .2678788

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
               Armenia |          1        5.26        5.26
            Azerbaijan |          2       10.53       15.79
                Brazil |          1        5.26       21.05
              Ethiopia |          1        5.26       26.32
             Indonesia |          1        5.26       31.58
                  Iran |          1        5.26       36.84
            Kazakhstan |          2       10.53       47.37
            Madagascar |          1        5.26       52.63
            Mozambique |          2       10.53       63.16
             Nicaragua |          2       10.53       73.68
                Russia |          1        5.26       78.95
             Venezuela |          4       21.05      100.00
-----------------------+-----------------------------------
                 Total |         19      100.00
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .1732632        .1453517     .217667*
             |                99.75    .1495247        .1179444    .2028941
             |                 99.5    .1208945          .09748    .1510445

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,704    .0162245    .0147111   .0027534    .152633

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         78    .0351983    .0373182   .0066212    .217667

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
             Argentina |          3        4.00        4.00
               Armenia |          1        1.33        5.33
            Azerbaijan |          3        4.00        9.33
            Bangladesh |          1        1.33       10.67
               Bolivia |          4        5.33       16.00
                Brazil |          2        2.67       18.67
              Cambodia |          2        2.67       21.33
                 China |          2        2.67       24.00
            Costa Rica |          2        2.67       26.67
         Dominican Rep |          1        1.33       28.00
               Ecuador |          3        4.00       32.00
                 Egypt |          3        4.00       36.00
           El Salvador |          1        1.33       37.33
              Ethiopia |          2        2.67       40.00
              Honduras |          1        1.33       41.33
             Indonesia |          3        4.00       45.33
                  Iran |          2        2.67       48.00
            Kazakhstan |          5        6.67       54.67
            Kyrgyzstan |          1        1.33       56.00
            Madagascar |          2        2.67       58.67
                Mexico |          1        1.33       60.00
            Mozambique |          3        4.00       64.00
             Nicaragua |          5        6.67       70.67
               Nigeria |          1        1.33       72.00
              Pakistan |          2        2.67       74.67
                Panama |          1        1.33       76.00
                  Peru |          3        4.00       80.00
           Philippines |          2        2.67       82.67
                Russia |          3        4.00       86.67
             Sri Lanka |          2        2.67       89.33
             Venezuela |          7        9.33       98.67
                Zambia |          1        1.33      100.00
-----------------------+-----------------------------------
                 Total |         75      100.00
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .2127764        .1548163    .2489748*
             |                99.75    .1585525        .1279985    .2369318
             |                 99.5    .1368927        .1029317    .1610659

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,763    .0163464    .0150293   .0026931   .1981652

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         19    .0834318    .0648612   .0223112   .2489748

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
               Armenia |          1        5.26        5.26
            Azerbaijan |          2       10.53       15.79
                Brazil |          1        5.26       21.05
              Ethiopia |          1        5.26       26.32
             Indonesia |          1        5.26       31.58
                  Iran |          1        5.26       36.84
            Kazakhstan |          2       10.53       47.37
            Madagascar |          1        5.26       52.63
            Mozambique |          2       10.53       63.16
             Nicaragua |          2       10.53       73.68
                Russia |          1        5.26       78.95
             Venezuela |          4       21.05      100.00
-----------------------+-----------------------------------
                 Total |         19      100.00
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .1843556         .147233    .2506672*
             |                99.75    .1553076        .1230903    .2286056
             |                 99.5     .130052        .0928965    .1604877

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,763    .0164036    .0148982    .002798    .165978

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         19    .0778481    .0612262   .0209953   .2506672

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
               Armenia |          1        5.26        5.26
            Azerbaijan |          2       10.53       15.79
                Brazil |          1        5.26       21.05
              Ethiopia |          1        5.26       26.32
             Indonesia |          1        5.26       31.58
                  Iran |          1        5.26       36.84
            Kazakhstan |          2       10.53       47.37
            Madagascar |          1        5.26       52.63
            Mozambique |          2       10.53       63.16
             Nicaragua |          2       10.53       73.68
                Russia |          1        5.26       78.95
             Venezuela |          4       21.05      100.00
-----------------------+-----------------------------------
                 Total |         19      100.00
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .1771506        .1519325     .229173*
             |                99.75    .1535204        .1214293    .2118654
             |                 99.5    .1229056        .1013049    .1538448

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,704    .0162289    .0146296   .0027455   .1566985

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         78    .0351316      .03945   .0067748    .229173

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
             Argentina |          3        4.00        4.00
               Armenia |          1        1.33        5.33
            Azerbaijan |          3        4.00        9.33
            Bangladesh |          1        1.33       10.67
               Bolivia |          4        5.33       16.00
                Brazil |          2        2.67       18.67
              Cambodia |          2        2.67       21.33
                 China |          2        2.67       24.00
            Costa Rica |          2        2.67       26.67
         Dominican Rep |          1        1.33       28.00
               Ecuador |          3        4.00       32.00
                 Egypt |          3        4.00       36.00
           El Salvador |          1        1.33       37.33
              Ethiopia |          2        2.67       40.00
              Honduras |          1        1.33       41.33
             Indonesia |          3        4.00       45.33
                  Iran |          2        2.67       48.00
            Kazakhstan |          5        6.67       54.67
            Kyrgyzstan |          1        1.33       56.00
            Madagascar |          2        2.67       58.67
                Mexico |          1        1.33       60.00
            Mozambique |          3        4.00       64.00
             Nicaragua |          5        6.67       70.67
               Nigeria |          1        1.33       72.00
              Pakistan |          2        2.67       74.67
                Panama |          1        1.33       76.00
                  Peru |          3        4.00       80.00
           Philippines |          2        2.67       82.67
                Russia |          3        4.00       86.67
             Sri Lanka |          2        2.67       89.33
             Venezuela |          7        9.33       98.67
                Zambia |          1        1.33      100.00
-----------------------+-----------------------------------
                 Total |         75      100.00
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .1936879        .1471837     .249274*
             |                99.75      .15194        .1181502    .2307808
             |                 99.5    .1199883          .10253    .1540343

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,763    .0163976     .014973   .0027196     .15444

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         19     .078519    .0611447      .0221    .249274

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
               Armenia |          1        5.26        5.26
            Azerbaijan |          2       10.53       15.79
                Brazil |          1        5.26       21.05
              Ethiopia |          1        5.26       26.32
             Indonesia |          1        5.26       31.58
                  Iran |          1        5.26       36.84
            Kazakhstan |          2       10.53       47.37
            Madagascar |          1        5.26       52.63
            Mozambique |          2       10.53       63.16
             Nicaragua |          2       10.53       73.68
                Russia |          1        5.26       78.95
             Venezuela |          4       21.05      100.00
-----------------------+-----------------------------------
                 Total |         19      100.00
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

                                                       -- Binom. Interp. --
    Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
          Hi |     1,782       99.9    .1865609        .1602091    .2399484*
             |                99.75    .1630818        .1362602    .2221866
             |                 99.5    .1369488        .1087438    .1634244

 Lower (upper) confidence limit held at minimum (maximum) of sample

-------------------------------------------------------------------------------
-> outbacon = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |      1,763    .0163851    .0156137    .002816   .1717651

-------------------------------------------------------------------------------
-> outbacon = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |         19    .0798144    .0611566   .0188127   .2399484

-------------------------------------------------------------------------------
-> outbacon = .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
          Hi |          0


           gwf_country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
               Armenia |          1        5.26        5.26
            Azerbaijan |          2       10.53       15.79
                Brazil |          1        5.26       21.05
              Ethiopia |          1        5.26       26.32
             Indonesia |          1        5.26       31.58
                  Iran |          1        5.26       36.84
            Kazakhstan |          2       10.53       47.37
            Madagascar |          1        5.26       52.63
            Mozambique |          2       10.53       63.16
             Nicaragua |          2       10.53       73.68
                Russia |          1        5.26       78.95
             Venezuela |          4       21.05      100.00
-----------------------+-----------------------------------
                 Total |         19      100.00

.                 gen hi =.
(3,595 missing values generated)

.                 gen lo =.
(3,595 missing values generated)

.                 gen mhi  =.
(3,595 missing values generated)

.                 gen mlo =.
(3,595 missing values generated)

.                 gen b =.
(3,595 missing values generated)

.                 gen se =.
(3,595 missing values generated)

.                 gen count =_n

.                 gen model = ""
(3,595 missing values generated)

.                 
.                 global count=5                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_personal"                                    
>            /* name of variable of interest to plot */

.                 forval d=0(1)4 {
  2.                         global imp ="impRob`d'"
  3.                         jwmi
  4.                 }

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str7
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06280363

symmetric se[1,1]
           c1
r1  .01914916
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06923462

symmetric se[1,1]
           c1
r1  .01922422
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 gen e=round(b,.001)
(3,590 missing values generated)

.                 
.                 twoway (scatter count b if count<=5,ylab(1(1)$ac,glcolor(gs16
> )) mlab(e) ///
>                 mlabpos(12) xlab(0(.02).12)  mcolor(gs6) msymbol(plus) yscale
> (range(0.75 5.5))  ///
>                 xtitle(Coefficient estimate) xline(0,lpat(dash)))  (rspike hi
>  lo count if count<=5, ///
>                 horizontal ytitle("") title("Drop influential observations",s
> ize(medium)) ///
>                 ylab(1 `""Drop Bacon" "outliers""' 2 "Drop 0.5%" 3 "Drop 0.25
> %" 4 "Drop 0.1%"  5 "Base" ) ///
>                 lcolor(gs6) lwidth(medthin)  legend(off) scheme(lean2)) ///
>                 (rspike mhi mlo count if count<=5, lwidth(thick) lcolor(gs6) 
> horizontal saving(h1.gph,replace))
(file h1.gph saved)

.                 drop e

.                 
.                 
.                 forval i = 1(1)$m {
  2.                         import delimited using "$dir\imputed-fdi\primary`i
> '.csv",clear
  3.                         qui:sort cow year
  4.                         qui:merge cow  year using "$dir\temp.dta"
  5.                         tsset cow year
  6.                         global cvarlist="allexp gtime lgdpcap lpop lopenne
> ss grow incidencev413 meanres ldevelopingfdi asia america easia ssa"         
>  
  7.                         * Drop one region at a time *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist,
>  re   
  8.                         est store impRob0`i'
  9.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if ssa==0, re
 10.                         est store impRob1`i'
 11.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if easia==0, re
 12.                         est store impRob2`i'
 13.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if meast==0, re
 14.                         est store impRob3`i'
 15.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if asia==0, re
 16.                         est store impRob4`i'
 17.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if americas==0, re
 18.                         est store impRob5`i'    
 19.                 }
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.                 gen hi =.
(3,595 missing values generated)

.                 gen lo =.
(3,595 missing values generated)

.                 gen mhi  =.
(3,595 missing values generated)

.                 gen mlo =.
(3,595 missing values generated)

.                 gen b =.
(3,595 missing values generated)

.                 gen se =.
(3,595 missing values generated)

.                 gen count =_n

.                 gen model = ""
(3,595 missing values generated)

.                 
.                 global count=6                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_personal"                                    
>            /* name of variable of interest to plot */

.                 forval d=0(1)5 {
  2.                         global imp ="impRob`d'"
  3.                         jwmi
  4.                 }

symmetric beta[1,1]
          c1
r1  .0605717

symmetric se[1,1]
           c1
r1  .01927966
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str7
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05738554

symmetric se[1,1]
           c1
r1  .02345025
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05684301

symmetric se[1,1]
           c1
r1  .02080728
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .05758489

symmetric se[1,1]
           c1
r1  .02024565
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .06567026

symmetric se[1,1]
           c1
r1  .02134709
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .07642734

symmetric se[1,1]
           c1
r1  .02041916
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 gen e=round(b,.001)
(3,589 missing values generated)

.                 
.                 twoway (scatter count b if count<=6,ylab(1(1)$ac,glcolor(gs16
> )) mlab(e) ///
>                 mlabpos(12) xlab(0(.02).12)  mcolor(gs6) msymbol(plus) yscale
> (range(0.75 6.5))  ///
>                 xtitle(Coefficient estimate) xline(0,lpat(dash)))  (rspike hi
>  lo count if count<=6, ///
>                 horizontal ytitle("") title("Drop regions, one at a time",siz
> e(medium)) ///
>                 ylab(1 "Drop Americas" 2 "Drop Asia" 3 "Drop M East" 4 "Drop 
> E Asia"  5 "Drop SSA" 6 `""Include" "all regions""' ) ///
>                 lcolor(gs6) lwidth(medthin)  legend(off) scheme(lean2)) ///
>                 (rspike mhi mlo count if count<=6, lwidth(thick) lcolor(gs6) 
> horizontal saving(h2.gph,replace))
(file h2.gph saved)

.                 drop e

.                 gr combine h1.gph h2.gph

.                 graph export "$dir\golden\OLS-Outliers.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\OLS-Outliers.pdf written in PDF format)

. 
. ***************************************************************
. ************* Appendix F: Models with no missing data ********* 
. ***************************************************************
.         ******************
.         *** Figure F-4 ***
.         ******************
.         use "$dir\temp.dta",clear

.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.         global cvarlist="allexp gtime lgdpcap lpop lopenness grow incidencev4
> 13 meanres ldevelopingfdi asia america easia ssa"

.         * test autocorrelation *
.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.         xtserial cub_Primaryfdigdp gwf_personal $cvarlist

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      57) =      7.951
           Prob > F =      0.0066

.         mixed cub_Primaryfdigdp gwf_personal  $cvarlist || cow:,residuals(ar1
> , t(year))  /* RE + ar1 errors  */
Note: time gaps exist in the estimation data

Obtaining starting values by EM: 

Performing gradient-based optimization: 

Iteration 0:   log likelihood =  788.89918  
Iteration 1:   log likelihood =  844.06342  
Iteration 2:   log likelihood =  844.07098  
Iteration 3:   log likelihood =  851.12397  
Iteration 4:   log likelihood =   851.2183  
Iteration 5:   log likelihood =  851.21846  
Iteration 6:   log likelihood =  851.21846  

Computing standard errors:

Mixed-effects ML regression                     Number of obs     =        874
Group variable: cowcode                         Number of groups  =         60

                                                Obs per group:
                                                              min =          1
                                                              avg =       14.6
                                                              max =         31

                                                Wald chi2(14)     =      53.45
Log likelihood =  851.21846                     Prob > chi2       =     0.0000

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0645433   .0236594     2.73   0.006     .0181717    .1109149
      allexp |  -.0225932   .0089516    -2.52   0.012     -.040138   -.0050485
       gtime |   .0229544   .0060102     3.82   0.000     .0111747    .0347341
     lgdpcap |  -.0349941    .012957    -2.70   0.007    -.0603893   -.0095988
        lpop |  -.0001904   .0103126    -0.02   0.985    -.0204027    .0200219
   lopenness |   .0197691   .0208942     0.95   0.344    -.0211828     .060721
        grow |   .0022996   .0007325     3.14   0.002     .0008639    .0037354
incidenc~413 |  -.0045928   .0140385    -0.33   0.744    -.0321078    .0229221
meanreserves |   .0155448   .0066126     2.35   0.019     .0025844    .0285052
ldevelopin~i |   .0026032   .0057472     0.45   0.651     -.008661    .0138674
        asia |  -.0510078   .0447026    -1.14   0.254    -.1386233    .0366077
    americas |   .0429716   .0342586     1.25   0.210    -.0241741    .1101172
       easia |   .0011517   .0472915     0.02   0.981     -.091538    .0938413
         ssa |   .0403696   .0440127     0.92   0.359    -.0458937    .1266329
       _cons |   .1602955   .2148986     0.75   0.456    -.2608981    .5814891
------------------------------------------------------------------------------

------------------------------------------------------------------------------
  Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
-----------------------------+------------------------------------------------
cowcode: Identity            |
                  var(_cons) |   .0064586   .0015554      .0040285    .0103545
-----------------------------+------------------------------------------------
Residual: AR(1)              |
                         rho |   .4223255    .037427      .3463055    .4928353
                      var(e) |   .0089316   .0005892      .0078483    .0101643
------------------------------------------------------------------------------
LR test vs. linear model: chi2(2) = 457.45                Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

.         mixed cub_Primaryfdigdp gwf_personal  $cvarlist || cow:,residuals(ma1
> , t(year))  /* RE + MA1 errors  */
Note: time gaps exist in the estimation data

Obtaining starting values by EM: 

Performing gradient-based optimization: 

Iteration 0:   log likelihood =  788.89918  
Iteration 1:   log likelihood =  834.03054  
Iteration 2:   log likelihood =   834.3986  
Iteration 3:   log likelihood =  834.42009  
Iteration 4:   log likelihood =  834.42013  

Computing standard errors:

Mixed-effects ML regression                     Number of obs     =        874
Group variable: cowcode                         Number of groups  =         60

                                                Obs per group:
                                                              min =          1
                                                              avg =       14.6
                                                              max =         31

                                                Wald chi2(14)     =      53.86
Log likelihood =  834.42013                     Prob > chi2       =     0.0000

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |    .060561    .021912     2.76   0.006     .0176143    .1035078
      allexp |  -.0225108   .0087972    -2.56   0.011     -.039753   -.0052686
       gtime |   .0225808   .0056608     3.99   0.000     .0114858    .0336758
     lgdpcap |  -.0340491   .0125526    -2.71   0.007    -.0586518   -.0094464
        lpop |  -.0019739     .01023    -0.19   0.847    -.0220243    .0180765
   lopenness |   .0164705   .0193438     0.85   0.395    -.0214427    .0543838
        grow |   .0021167     .00074     2.86   0.004     .0006663    .0035672
incidenc~413 |  -.0074333   .0137889    -0.54   0.590    -.0344591    .0195925
meanreserves |   .0160569   .0066791     2.40   0.016     .0029661    .0291477
ldevelopin~i |   .0025211   .0051415     0.49   0.624    -.0075561    .0125983
        asia |  -.0460623   .0450248    -1.02   0.306    -.1343093    .0421847
    americas |   .0424818   .0344831     1.23   0.218    -.0251038    .1100675
       easia |    .004672   .0474615     0.10   0.922    -.0883508    .0976949
         ssa |   .0453237   .0442284     1.02   0.305    -.0413624    .1320098
       _cons |    .198508   .2056913     0.97   0.335    -.2046396    .6016555
------------------------------------------------------------------------------

------------------------------------------------------------------------------
  Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
-----------------------------+------------------------------------------------
cowcode: Identity            |
                  var(_cons) |   .0072145   .0015816      .0046947    .0110869
-----------------------------+------------------------------------------------
Residual: MA(1)              |
                      theta1 |   .3203253   .0323018      .2556608    .3821363
                      var(e) |   .0082097   .0004393      .0073923    .0091175
------------------------------------------------------------------------------
LR test vs. linear model: chi2(2) = 423.85                Prob > chi2 = 0.0000

Note: LR test is conservative and provided only for reference.

.         xtregar cub_Primaryfdigdp gwf_personal  $cvarlist, re /* RE + ar1  */

RE GLS regression with AR(1) disturbances       Number of obs     =        874
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.0418                                         min =          1
     between = 0.2203                                         avg =       14.6
     overall = 0.1683                                         max =         31

                                                Wald chi2(15)     =      54.98
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2220   0.4371     0.6156     0.6940   0.6940

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0654836   .0228045     2.87   0.004     .0207876    .1101797
      allexp |  -.0226784   .0089679    -2.53   0.011     -.040255   -.0051017
       gtime |   .0219945   .0058887     3.74   0.000     .0104529    .0335361
     lgdpcap |   -.034588   .0122184    -2.83   0.005    -.0585356   -.0106404
        lpop |  -.0002646   .0097523    -0.03   0.978    -.0193787    .0188495
   lopenness |   .0181927   .0201852     0.90   0.367    -.0213696     .057755
        grow |   .0022491   .0007411     3.03   0.002     .0007966    .0037015
incidenc~413 |  -.0066625   .0140534    -0.47   0.635    -.0342066    .0208817
meanreserves |   .0154501   .0062107     2.49   0.013     .0032773    .0276229
ldevelopin~i |   .0027984   .0054909     0.51   0.610    -.0079636    .0135605
        asia |  -.0518709   .0419842    -1.24   0.217    -.1341583    .0304165
    americas |   .0412845   .0322321     1.28   0.200    -.0218893    .1044582
       easia |   .0010396   .0444927     0.02   0.981    -.0861645    .0882437
         ssa |   .0405163   .0413637     0.98   0.327    -.0405549    .1215876
       _cons |    .166936    .203844     0.82   0.413    -.2325909    .5664629
-------------+----------------------------------------------------------------
      rho_ar |  .36866103   (estimated autocorrelation coefficient)
     sigma_u |  .07460873
     sigma_e |  .08588147
     rho_fov |  .43010539   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         gen s2=e(sample)

.         est store main1

.         xtregar cub_Primaryfdigdp seizure_coup seizure_reb seizure_for gwf_pe
> rsonal $cvarlist, re  

RE GLS regression with AR(1) disturbances       Number of obs     =        874
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.0423                                         min =          1
     between = 0.2535                                         avg =       14.6
     overall = 0.2020                                         max =         31

                                                Wald chi2(18)     =      60.53
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.1982   0.4061     0.5886     0.6710   0.6710

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
seizure_coup |   .0188269   .0182446     1.03   0.302    -.0169318    .0545856
seizure_re~l |  -.0415461    .034083    -1.22   0.223    -.1083475    .0252553
seizure_fo~n |  -.0180487   .0382223    -0.47   0.637    -.0929631    .0568656
gwf_personal |   .0663266   .0226962     2.92   0.003     .0218428    .1108104
      allexp |  -.0229751   .0090236    -2.55   0.011    -.0406611   -.0052891
       gtime |   .0225743   .0062061     3.64   0.000     .0104106     .034738
     lgdpcap |  -.0340841   .0119688    -2.85   0.004    -.0575425   -.0106257
        lpop |  -.0003461   .0096998    -0.04   0.972    -.0193573    .0186652
   lopenness |   .0165658   .0199859     0.83   0.407    -.0226058    .0557374
        grow |   .0022539   .0007441     3.03   0.002     .0007954    .0037123
incidenc~413 |  -.0067964   .0140619    -0.48   0.629    -.0343572    .0207645
meanreserves |   .0166105   .0060457     2.75   0.006      .004761    .0284599
ldevelopin~i |   .0036986   .0055642     0.66   0.506    -.0072071    .0146043
        asia |  -.0464366   .0420721    -1.10   0.270    -.1288963    .0360232
    americas |   .0394221   .0307947     1.28   0.200    -.0209344    .0997786
       easia |   .0087549   .0446334     0.20   0.844    -.0787249    .0962347
         ssa |    .049188   .0398385     1.23   0.217     -.028894      .12727
       _cons |   .1593516   .2048376     0.78   0.437    -.2421228     .560826
-------------+----------------------------------------------------------------
      rho_ar |   .3688798   (estimated autocorrelation coefficient)
     sigma_u |  .06915225
     sigma_e |  .08624988
     rho_fov |  .39129399   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         * HAC errors *
.                         qui: ivreg2 cub_Primaryfdigdp gwf_personal $cvarlist,
> bw(2)r

.                         lincom gwf_pers

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0834781   .0219694     3.80   0.000     .0404187    .1265374
------------------------------------------------------------------------------

.                         est store er1

.                         * RE * 
.                         qui: xtreg cub_Primaryfdigdp gwf_personal $cvarlist,r
> e 

.                         lincom gwf_pers

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0553048   .0199305     2.77   0.006     .0162417    .0943679
------------------------------------------------------------------------------

.                         est store er2

.                         * RE + cluster * 
.                         qui: xtreg cub_Primaryfdigdp gwf_personal $cvarlist,r
> e vce(cluster cow)

.                         lincom gwf_pers

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0553048   .0254258     2.18   0.030     .0054712    .1051385
------------------------------------------------------------------------------

.                         est store er3

.                         * xtpcse: het + ar1 *
.                         qui: xtpcse cub_Primaryfdigdp gwf_personal $cvarlist,
> cor(ar1) het pairwise

.                         lincom gwf_pers

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0780336   .0285614     2.73   0.006     .0220543    .1340129
------------------------------------------------------------------------------

.                         est store er4

.                         * xtpcse: het + ps ar1 *
.                         qui: xtpcse cub_Primaryfdigdp gwf_personal $cvarlist,
> cor(psar1) het

.                         lincom gwf_pers

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0675107   .0216131     3.12   0.002     .0251497    .1098716
------------------------------------------------------------------------------

.                         est store er5

.                         
.         * 2SLS model keeps RE but drops AR(1) and uses cluster SE instead *
.                 * First show the RE with no AR(1)
.                         xtreg cub_Primaryfdigdp   gwf_personal $cvarlist if s
> 2==1,  re vce(cluster cow)

Random-effects GLS regression                   Number of obs     =        874
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.0431                                         min =          1
     between = 0.2146                                         avg =       14.6
     overall = 0.1612                                         max =         31

                                                Wald chi2(14)     =      26.22
corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0243

                               (Std. Err. adjusted for 60 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0553048   .0254258     2.18   0.030     .0054712    .1051385
      allexp |  -.0224051   .0241587    -0.93   0.354    -.0697553    .0249451
       gtime |   .0209874   .0094009     2.23   0.026      .002562    .0394129
     lgdpcap |  -.0328822   .0204165    -1.61   0.107    -.0728978    .0071335
        lpop |  -.0045225   .0084422    -0.54   0.592     -.021069     .012024
   lopenness |   .0124405   .0240714     0.52   0.605    -.0347386    .0596197
        grow |   .0018314   .0009697     1.89   0.059    -.0000691     .003732
incidenc~413 |  -.0132693   .0104554    -1.27   0.204    -.0337616     .007223
meanreserves |    .016742    .008707     1.92   0.055    -.0003234    .0338073
ldevelopin~i |   .0031181   .0079182     0.39   0.694    -.0124013    .0186375
        asia |  -.0390603   .0364404    -1.07   0.284    -.1104821    .0323616
    americas |   .0418163   .0302718     1.38   0.167    -.0175153    .1011478
       easia |   .0107426   .0292921     0.37   0.714    -.0466689    .0681541
         ssa |   .0520888   .0532065     0.98   0.328     -.052194    .1563717
       _cons |   .2465318   .2097209     1.18   0.240    -.1645136    .6575772
-------------+----------------------------------------------------------------
     sigma_u |  .09692558
     sigma_e |  .09021294
         rho |   .5358238   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         xtivreg cub_Primaryfdigdp  (gwf_personal=inst) $cvarl
> ist if s2==1,reg re vce(cluster cow) ec nosa /*OLS-RE*/

EC2SLS random-effects IV regression             Number of obs     =        874
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.0424                                         min =          1
     between = 0.2108                                         avg =       14.6
     overall = 0.1811                                         max =         31


                                                Wald chi2(14)     =      27.80
corr(u_i, X)       = 0 (assumed)                Prob > chi2       =     0.0151

                                   (Std. Err. adjusted for 48 clusters in cow)
------------------------------------------------------------------------------
             |               Robust
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0576796   .0259699     2.22   0.026     .0067796    .1085797
      allexp |  -.0223064   .0246633    -0.90   0.366    -.0706455    .0260327
       gtime |   .0205057   .0092174     2.22   0.026       .00244    .0385715
     lgdpcap |   -.037814   .0189083    -2.00   0.046    -.0748736   -.0007544
        lpop |  -.0027209   .0085573    -0.32   0.751    -.0194929    .0140512
   lopenness |   .0104139   .0237111     0.44   0.661    -.0360589    .0568867
        grow |   .0018962     .00099     1.92   0.055    -.0000441    .0038365
incidenc~413 |   -.014281   .0104675    -1.36   0.172    -.0347969    .0062349
meanreserves |    .014556   .0085178     1.71   0.087    -.0021386    .0312506
ldevelopin~i |   .0037471   .0078685     0.48   0.634    -.0116748     .019169
        asia |  -.0579542   .0428009    -1.35   0.176    -.1418424     .025934
    americas |   .0236328   .0315272     0.75   0.453    -.0381594    .0854249
       easia |  -.0073021   .0342669    -0.21   0.831    -.0744639    .0598597
         ssa |   .0300108   .0538018     0.56   0.577    -.0754388    .1354603
       _cons |   .2730897   .2016523     1.35   0.176    -.1221416     .668321
-------------+----------------------------------------------------------------
     sigma_u |  .07866987
     sigma_e |  .08971284
         rho |  .43469834   (fraction of variance due to u_i)
------------------------------------------------------------------------------
Instrumented:   gwf_personal
Instruments:    allexp gtime lgdpcap lpop lopenness grow incidencev413
                meanreserves ldevelopingfdi asia americas easia ssa
                gwf_personal
------------------------------------------------------------------------------

.                         est store main2

.                 * Next estimate the first stage with an RE OLS model 
.                         xtreg gwf_personal inst $cvarlist if s2==1, re cluste
> r(cow) theta

Random-effects GLS regression                   Number of obs     =        874
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.6550                                         min =          1
     between = 0.3300                                         avg =       14.6
     overall = 0.3643                                         max =         31

                                                Wald chi2(14)     =     135.87
corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.6606   0.8092     0.9040     0.9353   0.9353

                               (Std. Err. adjusted for 60 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
gwf_personal |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        inst |   .7105837    .179177     3.97   0.000     .3594032    1.061764
      allexp |   .0337964   .0219946     1.54   0.124    -.0093122    .0769051
       gtime |   .0144842   .0236019     0.61   0.539    -.0317747    .0607431
     lgdpcap |  -.0914081   .0527727    -1.73   0.083    -.1948407    .0120246
        lpop |  -.0842774   .0288511    -2.92   0.003    -.1408244   -.0277304
   lopenness |  -.0417726   .0467148    -0.89   0.371     -.133332    .0497868
        grow |  -.0004978   .0009328    -0.53   0.594    -.0023261    .0013304
incidenc~413 |   .0164799   .0103935     1.59   0.113     -.003891    .0368509
meanreserves |   .0409658   .0220058     1.86   0.063    -.0021649    .0840964
ldevelopin~i |   .0165335   .0115463     1.43   0.152    -.0060968    .0391638
        asia |   .3976995   .1856708     2.14   0.032     .0337913    .7616076
    americas |   .0463263   .1079966     0.43   0.668    -.1653431    .2579957
       easia |   .1351206   .1346234     1.00   0.316    -.1287364    .3989775
         ssa |   .1167278    .185481     0.63   0.529    -.2468083    .4802638
       _cons |   1.921516   .6153696     3.12   0.002     .7154142    3.127619
-------------+----------------------------------------------------------------
     sigma_u |  .24705271
     sigma_e |  .08915479
         rho |  .88477588   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         test inst

 ( 1)  inst = 0

           chi2(  1) =   15.73
         Prob > chi2 =    0.0001

.                         est store main3

.                 * Now use the Baltagi's EC2SLS random-effects estimator with 
> no AR(1) 
.                         xtivreg cub_Primaryfdigdp (gwf_personal=inst) $cvarli
> st if s2==1, re vce(cluster cow) first ec nosa

First-stage EC2SLS  regression
                                                 Number of obs    =        874
                                                 Wald chi(24)     =       1752
                                                 Prob > chi2      =     0.0000

                                    (Std. Err. adjusted for clustering on cow)
------------------------------------------------------------------------------
             |               Robust
gwf_personal |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      inst_d |   .7211109   .1811562     3.98   0.000     .3660512    1.076171
      inst_m |   .0852171   .0467697     1.82   0.068    -.0064499    .1768841
    allexp_d |   .0325858   .0222464     1.46   0.143    -.0110163     .076188
     gtime_d |   .0160665   .0241777     0.66   0.506    -.0313208    .0634539
   lgdpcap_d |  -.0872389   .0639349    -1.36   0.172     -.212549    .0380711
      lpop_d |   .0371864   .0782201     0.48   0.634    -.1161223     .190495
 lopenness_d |  -.0439106   .0488847    -0.90   0.369     -.139723    .0519017
      grow_d |  -.0005287   .0010044    -0.53   0.599    -.0024973    .0014399
incidencev~d |   .0168503   .0100628     1.67   0.094    -.0028723     .036573
meanreserv~d |    .129661   .6272958     0.21   0.836    -1.099816    1.359138
ldevelopin~d |   .0008529    .011109     0.08   0.939    -.0209204    .0226261
      asia_d |          0  (omitted)
  americas_d |          0  (omitted)
     easia_d |          0  (omitted)
       ssa_d |          0  (omitted)
    allexp_m |   .1963154   .0610745     3.21   0.001     .0766115    .3160193
     gtime_m |  -.0237936   .0100249    -2.37   0.018    -.0434419   -.0041452
   lgdpcap_m |  -.0005488   .0107197    -0.05   0.959     -.021559    .0204613
      lpop_m |  -.0314369   .0113947    -2.76   0.006    -.0537701   -.0091038
 lopenness_m |  -.0167083   .0248376    -0.67   0.501    -.0653891    .0319724
      grow_m |   .0115204   .0064116     1.80   0.072    -.0010461    .0240869
incidencev~m |   .0745438   .0352336     2.12   0.034     .0054871    .1436004
meanreserv~m |   .0056576   .0052017     1.09   0.277    -.0045375    .0158527
ldevelopin~m |   .0353525   .0189919     1.86   0.063     -.001871    .0725759
      asia_m |   .0535934   .0493704     1.09   0.278    -.0431709    .1503577
  americas_m |  -.0218482   .0307172    -0.71   0.477    -.0820529    .0383565
     easia_m |   .0021205   .0466179     0.05   0.964    -.0892489    .0934899
       ssa_m |   .0245108   .0372512     0.66   0.511    -.0485002    .0975218
       _cons |   .0908224   .1405625     0.65   0.518    -.1846751    .3663198
------------------------------------------------------------------------------

EC2SLS random-effects IV regression             Number of obs     =        874
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.0418                                         min =          1
     between = 0.2170                                         avg =       14.6
     overall = 0.1824                                         max =         31


                                                Wald chi2(14)     =      29.50
corr(u_i, X)       = 0 (assumed)                Prob > chi2       =     0.0089

                                   (Std. Err. adjusted for 48 clusters in cow)
------------------------------------------------------------------------------
             |               Robust
cub_Primar~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0663678   .0328228     2.02   0.043     .0020364    .1306993
      allexp |  -.0231298   .0245367    -0.94   0.346     -.071221    .0249613
       gtime |    .020858   .0092005     2.27   0.023     .0028252    .0388907
     lgdpcap |  -.0372258     .01926    -1.93   0.053    -.0749746    .0005231
        lpop |  -.0019108   .0090396    -0.21   0.833    -.0196281    .0158065
   lopenness |    .011337   .0237168     0.48   0.633     -.035147    .0578211
        grow |   .0018937   .0009864     1.92   0.055    -.0000396     .003827
incidenc~413 |  -.0146161   .0105148    -1.39   0.165    -.0352248    .0059926
meanreserves |   .0142009   .0082956     1.71   0.087    -.0020581    .0304599
ldevelopin~i |    .003434   .0078877     0.44   0.663    -.0120256    .0188936
        asia |  -.0588792   .0446911    -1.32   0.188    -.1464721    .0287137
    americas |   .0259931   .0330064     0.79   0.431    -.0386982    .0906844
       easia |   -.005925   .0363708    -0.16   0.871    -.0772105    .0653604
         ssa |   .0313229   .0556765     0.56   0.574    -.0778011    .1404469
       _cons |   .2525584   .2142151     1.18   0.238    -.1672954    .6724122
-------------+----------------------------------------------------------------
     sigma_u |  .08090981
     sigma_e |  .08971471
         rho |  .44853312   (fraction of variance due to u_i)
------------------------------------------------------------------------------
Instrumented:   gwf_personal
Instruments:    allexp gtime lgdpcap lpop lopenness grow incidencev413
                meanreserves ldevelopingfdi asia americas easia ssa inst
------------------------------------------------------------------------------

.                         est store main4

.         
.         label var lgdpcap  `" "GDP per "  "cap. (log)" "'

.         label var gtime `" "Regime"  "duration" "'

.         label var lpop  "Population"

.         label var allexp "Expropriations"

.         label var lopenness  `" "Trade    "  "openness" "'

.         label var grow "Growth"

.         label var incidencev413 `" "Civil   "  "conflict" "'

.         label var ldevelopingfdi `" "Total   "  "dev. FDI" "'

.         label var gwf_personal `" "{bf:Personalist}"  "{bf:regime}    " "'

.         label var meanreserves   `" "Pre-1980 oil"  "reserves   " "'

.         coefplot (main1, msymbol(T) mcolor($color1) ciopts(lcol($color1 $colo
> r1))) (main4, msymbol(S) mcolor($color3) ciopts(lcol($color3 $color3))), /*
>         */ title("Primary sector FDI" " ",size(medium) height(6))  scheme(lea
> n2) drop(_cons asia americas easia ssa) order(gwf_personal) /*
>         */ xlab(-.05 (.05) .15) ylab(,labsize(small)) xline(0, lpattern(dash)
> ) grid(glcolor(gs15)) mfcolor(white) ysize(3) xsize(3) /*
>         */ legend(label(3 "OLS") label(6 "2SLS-IV") pos(4) ring(0) col(1) siz
> e(medsmall)) levels(95 90) /*
>         */ xtitle("  Coefficient estimate", height(6)) b1("Region dummies not
>  reported" "Thick lines {&equiv} 90% CI; thin lines {&equiv} 95% CI", size(sm
> all)) 

.         graph export "$dir\golden\MainTable.pdf", as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\MainTable.pdf written in PDF format)

.                 
.         *******************************************
.         ********** Appendix J: China FDI **********
.         *******************************************
.                 forval i = 1(1)$m {
  2.                         qui:import delimited using "$dir\imputed-fdi\prima
> ry`i'.csv",clear
  3.                         global cvarlist="allexp gtime lgdpcap lpop lopenne
> ss grow incidencev413 meanres ldevelopingfdi asia america easia ssa"  
  4.                         *** 2010s interaction ***
.                         qui:gen d20 = year>=2001 & year<=2010
  5.                         qui:gen d20Xpers = gwf_pers*d20
  6.                         tsset cow year
  7.                         qui:xtregar cub_primaryfdigdp gwf_personal d20 d20
> Xpers $cvarlist, re
  8.                         est store rob`i'
  9.                 }
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

.                 
.                 gen hi =.
(1,782 missing values generated)

.                 gen lo =.
(1,782 missing values generated)

.                 gen mhi  =.
(1,782 missing values generated)

.                 gen mlo =.
(1,782 missing values generated)

.                 gen b =.
(1,782 missing values generated)

.                 gen se =.
(1,782 missing values generated)

.                 gen count =_n

.                 gen model = ""
(1,782 missing values generated)

.                 global count=1                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "d20X"                                            
>                    /* name of variable of interest to plot */

.                 global imp ="rob"

.                 jwmi

symmetric beta[1,1]
           c1
r1  .02757772

symmetric se[1,1]
           c1
r1  .02341759
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str3
(1 real change made)

.                 global count=1                                               
>                    /* number of specifications to test */

.                 global ac = $count

.                 global v = "gwf_pers"                                        
>            /* name of variable of interest to plot */

.                 global imp ="rob"

.                 jwmi    

symmetric beta[1,1]
           c1
r1  .05338728

symmetric se[1,1]
           c1
r1  .02111879
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(0 real changes made)

.                 
.                 ******************
.                 *** Figure J-1 ***
.                 ******************
.                 *** Control for Chinese FDI ***
.                 forval i = 1(1)$m {
  2.                         qui:import delimited using "$dir\imputed-fdi\prima
> ry`i'.csv",clear
  3.                         qui:sort cow year
  4.                         qui:merge cow  year using "$dir\tempchina.dta"
  5.                         qui:tsset cow year
  6.                         global cvarlist="allexp gtime lgdpcap lpop lopenne
> ss grow incidencev413 meanres ldevelopingfdi asia america easia ssa"         
>          
  7.                         * Drop one region at a time *
.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarlist,
>  re 
  8.                         qui:gen log_chinafdi = ln(1+value)
  9.                         hist log_chinafdi
 10.                         qui:xtregar cub_primaryfdigdp gwf_personal $cvarli
> st if log_chinafdi~=., re 
 11.                         est store china1`i'
 12.                         tab gwf_personal if e(sample)==1
 13.                         swilk log_chinafdi if e(sample)==1
 14.                         qui:xtregar cub_primaryfdigdp gwf_personal log_chi
> nafdi $cvarlist if log_chinafdi~=., re 
 15.                         est store china2`i'     
 16.                 }
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000
(bin=29, start=0, width=.29707678)

gwf_persona |
          l |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        446       84.31       84.31
          1 |         83       15.69      100.00
------------+-----------------------------------
      Total |        529      100.00

                   Shapiro-Wilk W test for normal data

    Variable |        Obs       W           V         z       Prob>z
-------------+------------------------------------------------------
log_chinafdi |        529    0.93655     22.457     7.499    0.00000

.                 gen hi =.
(3,595 missing values generated)

.                 gen lo =.
(3,595 missing values generated)

.                 gen mhi  =.
(3,595 missing values generated)

.                 gen mlo =.
(3,595 missing values generated)

.                 gen b =.
(3,595 missing values generated)

.                 gen se =.
(3,595 missing values generated)

.                 gen count =_n

.                 gen model = ""
(3,595 missing values generated)

.                 gen variable = ""                       
(3,595 missing values generated)

. 
.                 global imp ="china1"

.                 global count=10                                              
>                    /* number of specifications to test */

.                 global ac = $count

.                 global imp ="china1"

.                 local var = "gwf_pers allexp gtime lgdpcap lpop lopenness gro
> w incidencev413 meanres ldevelopingfdi"

.                 foreach cvar of local var {
  2.                         global v = "`cvar'"                               
>               /* name of variable of interest to plot */
  3.                         qui:replace variable = "$v" if count==$count
  4.                         jwmi 
  5.                 }

symmetric beta[1,1]
           c1
r1  .12013489

symmetric se[1,1]
           c1
r1  .03261438
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str6
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.03452334

symmetric se[1,1]
           c1
r1  .01328618
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .04093676

symmetric se[1,1]
           c1
r1  .00968309
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.04933268

symmetric se[1,1]
           c1
r1  .01460922
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01254849

symmetric se[1,1]
           c1
r1  .01179321
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .03766467

symmetric se[1,1]
           c1
r1  .02998107
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00271458

symmetric se[1,1]
           c1
r1  .00139549
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.01892294

symmetric se[1,1]
           c1
r1  .02190243
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01196693

symmetric se[1,1]
           c1
r1  .00665147
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01512832

symmetric se[1,1]
           c1
r1  .01258929
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 gen e=round(b,.001)
(3,585 missing values generated)

.                 gen s=round(se,.001)
(3,585 missing values generated)

.                 browse variable e s hi lo

.                 twoway (scatter count b if count<=10,ylab(1(1)$ac,glcolor(gs1
> 6)) mlab(e) mlabpos(12) xlab(-.05(.05).15) ///
>                 mcolor(gs6) msymbol(plus) yscale(range(0.75 10.25))  xtitle(C
> oefficient estimate) xline(0,lpat(dash))) ///
>                 (rspike hi lo count if count<=10, horizontal ytitle("") title
> (Reduced sample,size(medium)) ///
>                 ylab(1 `""Total" "Developing FDI""' 2 `""Oil reserves" "per c
> ap. (log)""' 3 "Civil conflict"  ///
>                 4 `""Annual" "GDP growth""' 5 "Trade (log)" 6 "Population (lo
> g)" 7 `""GDP" "per cap. (log)""' ///
>                 8 `""Regime" "Duration""' 9 "Expropriations" 10 "{bf:Personal
> ist}",labsize(small))  lcolor(gs6) lwidth(medthin) ///
>                 legend(off) scheme(lean2)) (rspike mhi mlo count if count<=10
> , lwidth(thick) lcolor(gs6) horizontal saving(h1.gph,replace))
(file h1.gph saved)

.                 drop s e

.                 
.                 global imp ="china2"            

.                 global count=11                                              
>                    /* number of specifications to test */

.                 global ac = $count

.                 local var = "gwf_pers log_china allexp gtime lgdpcap lpop lop
> enness grow incidencev413 meanres ldevelopingfdi "

.                 foreach cvar of local var {
  2.                         global v = "`cvar'"                               
>               /* name of variable of interest to plot */
  3.                         qui:replace variable = "$v" if count==$count
  4.                         jwmi 
  5.                 }

symmetric beta[1,1]
           c1
r1  .11951609

symmetric se[1,1]
           c1
r1  .03244749
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00539957

symmetric se[1,1]
           c1
r1  .00375315
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.03443462

symmetric se[1,1]
           c1
r1  .01324677
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .04080968

symmetric se[1,1]
           c1
r1  .00962541
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.05203294

symmetric se[1,1]
           c1
r1  .01465715
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
         c1
r1  .012424

symmetric se[1,1]
           c1
r1  .01174264
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .03785588

symmetric se[1,1]
           c1
r1  .02981272
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00274264

symmetric se[1,1]
           c1
r1  .00139201
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  -.0177606

symmetric se[1,1]
           c1
r1  .02185268
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00988405

symmetric se[1,1]
           c1
r1  .00684519
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00847598

symmetric se[1,1]
           c1
r1  .01326979
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 gen e=round(b,.001)
(3,584 missing values generated)

.                 gen s=round(se,.001)
(3,584 missing values generated)

.                 browse variable e s hi lo

.                 twoway (scatter count b if count<=11,ylab(1(1)$ac,glcolor(gs1
> 6)) mlab(e) mlabpos(12) xlab(-.05(.05).15) ///
>                 mcolor(gs6) msymbol(plus) yscale(range(0.75 11.25))  xtitle(C
> oefficient estimate) xline(0,lpat(dash))) ///
>                 (rspike hi lo count if count<=11, horizontal ytitle("") title
> (Add Chinese FDI,size(medium)) ///
>                 ylab(1 `""Total" "Developing FDI""' 2 `""Oil reserves" "per c
> ap. (log)""' 3 "Civil conflict"  ///
>                 4 `""Annual" "GDP growth""' 5 "Trade (log)" 6 "Population (lo
> g)" 7 `""GDP" "per cap. (log)""' ///
>                 8 `""Regime" "Duration""' 9 "Expropriations" 10 "Chinese FDI"
>  11 "{bf:Personalist}",labsize(small))  lcolor(gs6) lwidth(medthin) ///
>                 legend(off) scheme(lean2)) (rspike mhi mlo count if count<=11
> , lwidth(thick) lcolor(gs6) horizontal saving(h2.gph,replace))
(file h2.gph saved)

.                 drop s e

.                 gr combine h1.gph h2.gph

.                 graph export "$dir\golden\China-FDI.pdf", as(pdf) replace    
>    
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\China-FDI.pdf written in PDF format)

.                 
.                 
. ***************************************
. *** Appendix K: ONDD political risk ***
. ***************************************
.                 use temp,clear

.                 sort cow year

.                 merge cow year using "$dir\ONDD-1992-2013.dta"
(note: you are using old merge syntax; see [D] merge for new syntax)

.                 tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      1,588       38.77       38.77
          2 |        565       13.79       52.56
          3 |      1,943       47.44      100.00
------------+-----------------------------------
      Total |      4,096      100.00

.                 tab country1 if _merge==2 & year<2011

           country1 |      Freq.     Percent        Cum.
--------------------+-----------------------------------
        Afghanistan |         12        5.38        5.38
              Chile |          1        0.45        5.83
            Eritrea |          2        0.90        6.73
             Greece |         19        8.52       15.25
            Hungary |         15        6.73       21.97
               Iran |          7        3.14       25.11
        Korea South |         15        6.73       31.84
            Liberia |          6        2.69       34.53
             Mexico |         17        7.62       42.15
             Poland |         15        6.73       48.88
           Portugal |         19        8.52       57.40
             Serbia |         19        8.52       65.92
            Somalia |         19        8.52       74.44
              Spain |         19        8.52       82.96
             Turkey |         19        8.52       91.48
              Yemen |         19        8.52      100.00
--------------------+-----------------------------------
              Total |        223      100.00

.                 tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2013, but with gaps
                delta:  1 unit

.                 gen lONDD = l.ONDD_score
(1,968 missing values generated)

.                 gen priordem = gwf_prior_original=="democracy" | allregime==1

.                 * keep only the GWF autocracy and democracy data *
.                 drop if allregime==.
(565 observations deleted)

.                         
.                 global cvar = "gtime oilpc allexp lgdpcap lpop lopenness grow
>  incidence"

.                 global unit = "i.year meast americas ssa asia easia"

.                 tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

. 
.                 * Plot *
.                 egen regimemean  =mean(ONDD_score),by(allregime)

.                 egen tag = tag(allregime) if regimemean~=.

.                 label define reg 1 "Democracy" 2 "Military" 3 "Monarchy" 4  "
> Party"  5 "Personal"

.                 label values allregime reg  

.                 graph bar regimemean if tag==1,over(allregime) ytitle(Average
>  ONDD score,height(6)) ///
>                         title(Regime type and political risk) scheme(lean2) y
> lab(,glcol(gs15)) saving(h1.gph,replace)  
(file h1.gph saved)

.                 ttest ONDD_score if gwf_non=="NA",by(gwf_pers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     666    3.165165    .0557359    1.438374    3.055726    3.274605
       1 |     340    4.282353    .0635094    1.171055    4.157431    4.407275
---------+--------------------------------------------------------------------
combined |   1,006    3.542744    .0458096    1.452965     3.45285    3.632637
---------+--------------------------------------------------------------------
    diff |           -1.117188    .0902506               -1.294289   -.9400863
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t = -12.3787
Ho: diff = 0                                     degrees of freedom =     1004

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                 ttest ONDD_score if allregime==1 | allregime==5,by(gwf_pers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     699    3.111588    .0516045    1.364352    3.010269    3.212907
       1 |     340    4.282353    .0635094    1.171055    4.157431    4.407275
---------+--------------------------------------------------------------------
combined |   1,039    3.494706    .0438922      1.4148    3.408579    3.580834
---------+--------------------------------------------------------------------
    diff |           -1.170765    .0862409               -1.339991   -1.001538
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t = -13.5755
Ho: diff = 0                                     degrees of freedom =     1037

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                 ttest ONDD_score if allregime==2 | allregime==5,by(gwf_pers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      79    4.189873    .1222901    1.086938    3.946413    4.433334
       1 |     340    4.282353    .0635094    1.171055    4.157431    4.407275
---------+--------------------------------------------------------------------
combined |     419    4.264916     .056424    1.154971    4.154006    4.375827
---------+--------------------------------------------------------------------
    diff |           -.0924795    .1443549               -.3762335    .1912744
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.6406
Ho: diff = 0                                     degrees of freedom =      417

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.2611         Pr(|T| > |t|) = 0.5221          Pr(T > t) = 0.7389

.                 ttest ONDD_score if allregime==3 | allregime==5,by(gwf_pers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     123    2.373984    .0546375    .6059591    2.265823    2.482144
       1 |     340    4.282353    .0635094    1.171055    4.157431    4.407275
---------+--------------------------------------------------------------------
combined |     463    3.775378    .0626147    1.347307    3.652333    3.898423
---------+--------------------------------------------------------------------
    diff |           -1.908369    .1106373               -2.125785   -1.690953
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t = -17.2489
Ho: diff = 0                                     degrees of freedom =      461

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                 ttest ONDD_score if allregime==4 | allregime==5,by(gwf_pers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     464    3.200431    .0708488    1.526129    3.061206    3.339656
       1 |     340    4.282353    .0635094    1.171055    4.157431    4.407275
---------+--------------------------------------------------------------------
combined |     804     3.65796    .0524036    1.485898    3.555096    3.760824
---------+--------------------------------------------------------------------
    diff |           -1.081922    .0990287               -1.276308   -.8875359
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t = -10.9253
Ho: diff = 0                                     degrees of freedom =      802

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000

.                 replace grow  = grow/10
(3,205 real changes made)

.                 
.                 * Post-2001 
.                 egen regimemean2002  =mean(ONDD_score) if year>=2002,by(allre
> gime)
(2506 missing values generated)

.                 egen tag2002 = tag(allregime) if regimemean~=. & year>=2002

.                 graph bar regimemean if tag==1,over(allregime) ytitle(Average
>  ONDD score,height(6)) ///
>                         title("Regime type and political risk, 2002-2010") sc
> heme(lean2) ylab(,glcol(gs15)) 

.                 
.                 ******************
.                 *** Figure K-1 ***
.                 ******************
.                 * Reported *
.                 ologit ONDD_score $unit $cvar gwf_party gwf_military gwf_mona
> rchy gwf_pers,vce(cluster cow)

Iteration 0:   log pseudolikelihood = -2659.0037  
Iteration 1:   log pseudolikelihood = -2029.1561  
Iteration 2:   log pseudolikelihood = -1959.1098  
Iteration 3:   log pseudolikelihood = -1957.5339  
Iteration 4:   log pseudolikelihood = -1957.5295  
Iteration 5:   log pseudolikelihood = -1957.5295  

Ordered logistic regression                     Number of obs     =      1,586
                                                Wald chi2(35)     =     351.52
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -1957.5295               Pseudo R2         =     0.2638

                              (Std. Err. adjusted for 102 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        year |
       1993  |  -1.145438   .1881947    -6.09   0.000    -1.514293   -.7765834
       1994  |  -1.773515   .2792786    -6.35   0.000    -2.320892   -1.226139
       1995  |  -1.976433   .2870841    -6.88   0.000    -2.539108   -1.413759
       1996  |   -2.04124   .2715251    -7.52   0.000     -2.57342   -1.509061
       1997  |  -1.896721   .2784728    -6.81   0.000    -2.442517   -1.350924
       1998  |  -1.742698   .2668758    -6.53   0.000    -2.265765   -1.219631
       1999  |  -1.671689   .2701012    -6.19   0.000    -2.201078   -1.142301
       2000  |  -1.745146   .2651423    -6.58   0.000    -2.264816   -1.225477
       2001  |   -2.39932   .3535824    -6.79   0.000    -3.092328   -1.706311
       2002  |   .9887046   .3191568     3.10   0.002     .3631687     1.61424
       2003  |   1.024322   .3233964     3.17   0.002     .3904769    1.658168
       2004  |   .7180623   .3286007     2.19   0.029     .0740168    1.362108
       2005  |   .5998854   .3508635     1.71   0.087    -.0877945    1.287565
       2006  |   .3907408   .3408432     1.15   0.252    -.2772996    1.058781
       2007  |   .4664677   .3549019     1.31   0.189    -.2291273    1.162063
       2008  |   .5834578   .3527117     1.65   0.098    -.1078444     1.27476
       2009  |   .7536497     .34156     2.21   0.027     .0842045    1.423095
       2010  |   1.025089   .3476704     2.95   0.003     .3436671     1.70651
             |
       meast |   .9346669   .7613753     1.23   0.220    -.5576012    2.426935
    americas |   1.248708   .6827521     1.83   0.067    -.0894614    2.586878
         ssa |   .5399838   .6908257     0.78   0.434    -.8140097    1.893977
        asia |   .6860618   .6970212     0.98   0.325    -.6800747    2.052198
       easia |  -.1269773   .7786563    -0.16   0.870    -1.653116    1.399161
       gtime |  -.2354065   .1267583    -1.86   0.063    -.4838481    .0130351
       oilpc |   .3702439   .0558295     6.63   0.000     .2608201    .4796678
      allexp |   .7569008   .4176198     1.81   0.070    -.0616189    1.575421
     lgdpcap |  -1.580776   .1795844    -8.80   0.000    -1.932755   -1.228797
        lpop |  -.3061113   .1356926    -2.26   0.024    -.5720638   -.0401587
   lopenness |  -.0725721   .3824541    -0.19   0.850    -.8221683    .6770241
        grow |  -.1562387   .1394153    -1.12   0.262    -.4294877    .1170102
incidenc~413 |   .9328985   .2238403     4.17   0.000     .4941796    1.371617
   gwf_party |   .1765127   .4417854     0.40   0.689    -.6893709    1.042396
gwf_military |   .4936283   .2841768     1.74   0.082    -.0633479    1.050605
gwf_monarchy |   .2643922    .659264     0.40   0.688    -1.027742    1.556526
gwf_personal |   1.110132    .356545     3.11   0.002     .4113171    1.808948
-------------+----------------------------------------------------------------
       /cut1 |  -20.35177   3.670263                     -27.54535   -13.15819
       /cut2 |  -16.65115   3.612948                      -23.7324   -9.569905
       /cut3 |  -15.22296    3.60144                     -22.28165   -8.164267
       /cut4 |  -13.37596   3.569179                     -20.37142   -6.380498
       /cut5 |  -11.21957   3.498188                      -18.0759   -4.363253
       /cut6 |  -9.814594   3.523028                      -16.7196   -2.909586
------------------------------------------------------------------------------

.                  egen count=count(year) if e(sample)==1,by(gwf_casename)
(1945 missing values generated)

.                  tab count

      count |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         16        1.01        1.01
          2 |         32        2.02        3.03
          3 |         30        1.89        4.92
          4 |         28        1.77        6.68
          5 |         40        2.52        9.21
          6 |         36        2.27       11.48
          7 |         14        0.88       12.36
          8 |         56        3.53       15.89
          9 |         54        3.40       19.29
         10 |         70        4.41       23.71
         11 |         44        2.77       26.48
         12 |         24        1.51       27.99
         13 |         52        3.28       31.27
         14 |         42        2.65       33.92
         15 |         45        2.84       36.76
         16 |        160       10.09       46.85
         17 |         68        4.29       51.13
         18 |         72        4.54       55.67
         19 |        703       44.33      100.00
------------+-----------------------------------
      Total |      1,586      100.00

.                 est store ondd1

.                         label var lgdpcap  "GDP per cap. (log)"

.                         label var lgdp  "GDP (log)"

.                         label var lpop  "Population (log)"

.                         label var lopenness  "Trade open (log)"

.                         label var grow "Annual GDP Growth"

.                         label var allexp "Expropriations"

.                         label var incidencev413 "Civil conflict"

.                         label var gwf_personal "Personalist"

.                         label var gwf_party "Party"

.                         label var gwf_military "Military"

.                         label var gwf_monarchy "Monarchy"

.                         label var gtime "Regime duration (log)"

.                         label var oilpc "Oil per cap. (log)"

.                 coefplot (ondd1, msymbol(D)),scheme(lean2) title("Political R
> isk") ///
>                         drop(_cons meast americas ssa asia easia 19* 20*) ///
>                         order(gwf_personal gwf_party gwf_military gwf_monarch
> y lgdp lgdpcap lpop lopenness) ///
>                         scale(.75) xlab(-2(.5)2) xline(0, lpattern(dash)) gri
> d(glcolor(gs15)) mfcolor(white)  ///
>                         levels(95 90) xtitle("  Coefficient estimate", height
> (3)) saving(h2.gph,replace)  
(file h2.gph saved)

.                         gr combine h1.gph h2.gph,xsize(8)

.                 graph export "$dir\golden\ONDD.pdf", as(pdf) replace    
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ONDD.pdf written in PDF format)

. 
.                 * Parsimonious *
.                 xtreg ONDD_score i.year gwf_pers,vce(cluster cow)

Random-effects GLS regression                   Number of obs     =      1,705
Group variable: cowcode                         Number of groups  =        105

R-sq:                                           Obs per group:
     within  = 0.3416                                         min =          1
     between = 0.3501                                         avg =       16.2
     overall = 0.2600                                         max =         19

                                                Wald chi2(19)     =     380.04
corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000

                              (Std. Err. adjusted for 105 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        year |
       1993  |  -.5441639   .0701022    -7.76   0.000    -.6815617   -.4067662
       1994  |  -.8084566   .1027271    -7.87   0.000    -1.009798   -.6071152
       1995  |  -.9048421   .1093515    -8.27   0.000    -1.119167   -.6905172
       1996  |  -.9770721   .1095437    -8.92   0.000    -1.191774   -.7623704
       1997  |  -.8994149   .1128435    -7.97   0.000    -1.120584   -.6782458
       1998  |  -.8642184   .1102686    -7.84   0.000    -1.080341   -.6480958
       1999  |  -.8588456   .1105162    -7.77   0.000    -1.075453   -.6422378
       2000  |  -.8588456   .1109735    -7.74   0.000     -1.07635   -.6413416
       2001  |  -1.122185   .1336801    -8.39   0.000    -1.384194   -.8601771
       2002  |   .4216777   .1480539     2.85   0.004     .1314974     .711858
       2003  |   .3704846   .1458378     2.54   0.011     .0846477    .6563214
       2004  |   .2303158   .1454117     1.58   0.113    -.0546859    .5153175
       2005  |   .1419797   .1482527     0.96   0.338    -.1485902    .4325497
       2006  |   .1116197    .152858     0.73   0.465    -.1879765    .4112158
       2007  |     .13418   .1595756     0.84   0.400    -.1785825    .4469425
       2008  |   .1636222   .1647548     0.99   0.321    -.1592913    .4865357
       2009  |   .2686246   .1694834     1.58   0.113    -.0635568    .6008059
       2010  |   .2926409   .1691702     1.73   0.084    -.0389265    .6242084
             |
gwf_personal |    .709769   .2232975     3.18   0.001     .2721141    1.147424
       _cons |    3.52488   .1384326    25.46   0.000     3.253557    3.796203
-------------+----------------------------------------------------------------
     sigma_u |   .9201839
     sigma_e |  .78747625
         rho |  .57724663   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                 xtologit ONDD_score i.year gwf_pers,vce(cluster cow)

Fitting comparison model:

Iteration 0:   log likelihood = -2901.1206  
Iteration 1:   log likelihood = -2644.4323  
Iteration 2:   log likelihood = -2639.3359  
Iteration 3:   log likelihood = -2639.3217  
Iteration 4:   log likelihood = -2639.3217  

Refining starting values:

Grid node 0:   log likelihood = -2237.4096

Fitting full model:

Iteration 0:   log pseudolikelihood = -2237.4096  
Iteration 1:   log pseudolikelihood = -2001.2002  
Iteration 2:   log pseudolikelihood =  -1975.464  
Iteration 3:   log pseudolikelihood = -1969.0187  
Iteration 4:   log pseudolikelihood = -1968.3741  
Iteration 5:   log pseudolikelihood = -1968.3624  
Iteration 6:   log pseudolikelihood = -1968.3624  

Random-effects ordered logistic regression      Number of obs     =      1,705
Group variable: cowcode                         Number of groups  =        105

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       16.2
                                                              max =         19

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(19)     =     194.07
Log pseudolikelihood  = -1968.3624              Prob > chi2       =     0.0000

                              (Std. Err. adjusted for 105 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
             |
        year |
       1993  |  -1.404075   .2091589    -6.71   0.000    -1.814019   -.9941309
       1994  |  -2.327083   .3251754    -7.16   0.000    -2.964415   -1.689751
       1995  |  -2.538039   .3340101    -7.60   0.000    -3.192687   -1.883392
       1996  |  -2.772873   .3397098    -8.16   0.000    -3.438693   -2.107054
       1997  |  -2.553417   .3469715    -7.36   0.000    -3.233469   -1.873366
       1998  |  -2.417429   .3243722    -7.45   0.000    -3.053186   -1.781671
       1999  |  -2.400772    .326429    -7.35   0.000    -3.040561   -1.760983
       2000  |  -2.405737   .3277727    -7.34   0.000    -3.048159   -1.763314
       2001  |  -3.299756   .4530575    -7.28   0.000    -4.187732    -2.41178
       2002  |   .9279468    .356281     2.60   0.009     .2296489    1.626245
       2003  |   .8169034   .3458333     2.36   0.018     .1390826    1.494724
       2004  |     .49278   .3436853     1.43   0.152    -.1808308    1.166391
       2005  |   .2190455   .3599075     0.61   0.543    -.4863603    .9244513
       2006  |   .0906238   .3706926     0.24   0.807    -.6359203    .8171679
       2007  |   .0856007   .3822185     0.22   0.823    -.6635339    .8347353
       2008  |   .1190797   .3892935     0.31   0.760    -.6439216     .882081
       2009  |   .3678315   .3982956     0.92   0.356    -.4128136    1.148476
       2010  |    .401161   .3904933     1.03   0.304    -.3641918    1.166514
             |
gwf_personal |   1.528783   .5112443     2.99   0.003     .5267623    2.530803
-------------+----------------------------------------------------------------
       /cut1 |  -6.911559   .6386192                      -8.16323   -5.659889
       /cut2 |  -1.829138   .4184422                      -2.64927   -1.009007
       /cut3 |  -.0738379   .3834588                     -.8254033    .6777276
       /cut4 |   2.204829   .3798762                      1.460285    2.949372
       /cut5 |   4.805913    .459803                      3.904716     5.70711
       /cut6 |   6.722067   .7091193                      5.332218    8.111915
-------------+----------------------------------------------------------------
   /sigma2_u |   8.590036   1.801513                       5.69482    12.95717
------------------------------------------------------------------------------

. 
.                 * Baseline *
.                 xtreg ONDD_score $unit $cvar gwf_party gwf_military gwf_monar
> chy gwf_pers,re vce(cluster cow)

Random-effects GLS regression                   Number of obs     =      1,586
Group variable: cowcode                         Number of groups  =        102

R-sq:                                           Obs per group:
     within  = 0.4042                                         min =          1
     between = 0.7069                                         avg =       15.5
     overall = 0.5585                                         max =         19

                                                Wald chi2(35)     =     908.60
corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000

                              (Std. Err. adjusted for 102 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        year |
       1993  |  -.5173235   .0786837    -6.57   0.000    -.6715408   -.3631063
       1994  |  -.7623978   .1134138    -6.72   0.000    -.9846848   -.5401109
       1995  |  -.8570964   .1205091    -7.11   0.000     -1.09329    -.620903
       1996  |  -.8852752   .1152286    -7.68   0.000    -1.111119   -.6594313
       1997  |  -.8089866   .1194129    -6.77   0.000    -1.043032   -.5749416
       1998  |  -.7699986   .1197477    -6.43   0.000      -1.0047   -.5352974
       1999  |  -.7425097   .1224138    -6.07   0.000    -.9824365    -.502583
       2000  |  -.7714263   .1223484    -6.31   0.000    -1.011225    -.531628
       2001  |  -1.067129   .1498475    -7.12   0.000    -1.360825    -.773433
       2002  |   .5145812   .1595503     3.23   0.001     .2018683    .8272941
       2003  |   .5088345   .1641764     3.10   0.002     .1870546    .8306144
       2004  |    .379609   .1698094     2.24   0.025     .0467887    .7124293
       2005  |   .3237204   .1766848     1.83   0.067    -.0225755    .6700164
       2006  |   .2394418   .1695115     1.41   0.158    -.0927946    .5716783
       2007  |    .301943   .1781474     1.69   0.090    -.0472195    .6511055
       2008  |   .3704459   .1901674     1.95   0.051    -.0022753    .7431672
       2009  |    .492521   .1856226     2.65   0.008     .1287074    .8563346
       2010  |   .6141573   .1943156     3.16   0.002     .2333057    .9950089
             |
       meast |   .6154728   .4398366     1.40   0.162     -.246591    1.477537
    americas |   .4743769   .3266785     1.45   0.146    -.1659011    1.114655
         ssa |   .0576343   .3605049     0.16   0.873    -.6489423    .7642109
        asia |    .322688   .3730185     0.87   0.387    -.4084148    1.053791
       easia |  -.1792119   .4229365    -0.42   0.672    -1.008152    .6497285
       gtime |   -.172096   .0642117    -2.68   0.007    -.2979486   -.0462434
       oilpc |   .1466613   .0420503     3.49   0.000     .0642442    .2290785
      allexp |     .43787   .1604968     2.73   0.006     .1233021    .7524379
     lgdpcap |  -.7514664   .1242338    -6.05   0.000    -.9949601   -.5079727
        lpop |  -.1854348   .0698833    -2.65   0.008    -.3224035   -.0484661
   lopenness |    .045446   .1791256     0.25   0.800    -.3056338    .3965258
        grow |  -.0291431   .0471895    -0.62   0.537    -.1216328    .0633466
incidenc~413 |   .2924908   .0987672     2.96   0.003     .0989108    .4860709
   gwf_party |    .236946   .2739231     0.87   0.387    -.2999334    .7738255
gwf_military |   .2434468   .1976968     1.23   0.218    -.1440318    .6309254
gwf_monarchy |  -.1291766   .3921515    -0.33   0.742    -.8977793    .6394262
gwf_personal |   .4558218   .1721471     2.65   0.008     .1184197    .7932238
       _cons |   11.40218   1.930861     5.91   0.000      7.61776     15.1866
-------------+----------------------------------------------------------------
     sigma_u |  .64138597
     sigma_e |  .73129166
         rho |  .43478319   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                 xtologit ONDD_score $unit $cvar gwf_party gwf_military gwf_mo
> narchy gwf_pers,vce(cluster cow)

Fitting comparison model:

Iteration 0:   log likelihood = -2659.0037  
Iteration 1:   log likelihood = -2029.1561  
Iteration 2:   log likelihood = -1959.1098  
Iteration 3:   log likelihood = -1957.5339  
Iteration 4:   log likelihood = -1957.5295  
Iteration 5:   log likelihood = -1957.5295  

Refining starting values:

Grid node 0:   log likelihood = -1764.1487

Fitting full model:

Iteration 0:   log pseudolikelihood = -1764.1487  
Iteration 1:   log pseudolikelihood = -1693.4075  
Iteration 2:   log pseudolikelihood = -1687.8126  
Iteration 3:   log pseudolikelihood = -1687.3931  
Iteration 4:   log pseudolikelihood = -1687.3905  
Iteration 5:   log pseudolikelihood = -1687.3905  

Random-effects ordered logistic regression      Number of obs     =      1,586
Group variable: cowcode                         Number of groups  =        102

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       15.5
                                                              max =         19

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(35)     =     299.81
Log pseudolikelihood  = -1687.3905              Prob > chi2       =     0.0000

                              (Std. Err. adjusted for 102 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
             |
        year |
       1993  |  -1.461507   .2459042    -5.94   0.000    -1.943471    -.979544
       1994  |  -2.373691   .3647233    -6.51   0.000    -3.088536   -1.658847
       1995  |  -2.634819   .3910743    -6.74   0.000     -3.40131   -1.868327
       1996  |  -2.726258   .3792838    -7.19   0.000    -3.469641   -1.982876
       1997  |  -2.505453   .3861873    -6.49   0.000    -3.262367    -1.74854
       1998  |  -2.378068   .3823563    -6.22   0.000    -3.127473   -1.628664
       1999  |  -2.282736   .3905238    -5.85   0.000    -3.048149   -1.517324
       2000  |  -2.406878   .3897405    -6.18   0.000    -3.170756   -1.643001
       2001  |  -3.462436   .5224976    -6.63   0.000    -4.486512   -2.438359
       2002  |   1.314292   .4161099     3.16   0.002     .4987314    2.129852
       2003  |   1.315065   .4251018     3.09   0.002     .4818803    2.148249
       2004  |   1.019738    .437083     2.33   0.020     .1630713    1.876405
       2005  |   .8207522   .4648238     1.77   0.077    -.0902858     1.73179
       2006  |   .5847872   .4492097     1.30   0.193    -.2956477    1.465222
       2007  |   .6954156   .4760506     1.46   0.144    -.2376263    1.628458
       2008  |   .8534292   .4967394     1.72   0.086    -.1201621     1.82702
       2009  |   1.153938    .483357     2.39   0.017     .2065759    2.101301
       2010  |   1.514814   .4982653     3.04   0.002     .5382323    2.491396
             |
       meast |    2.01291   1.283632     1.57   0.117    -.5029621    4.528783
    americas |   1.578022   1.063429     1.48   0.138    -.5062612    3.662306
         ssa |   .1390484   1.150822     0.12   0.904    -2.116521    2.394618
        asia |   1.086971   1.105223     0.98   0.325    -1.079227    3.253169
       easia |  -.5409171   1.260984    -0.43   0.668    -3.012401    1.930566
       gtime |  -.4341375   .1880253    -2.31   0.021    -.8026604   -.0656147
       oilpc |   .4457936   .1308179     3.41   0.001     .1893952     .702192
      allexp |   1.118136   .4492126     2.49   0.013     .2376953    1.998576
     lgdpcap |  -2.387738   .3932384    -6.07   0.000    -3.158471   -1.617004
        lpop |  -.5725023    .209795    -2.73   0.006    -.9836928   -.1613117
   lopenness |   .0195343    .490915     0.04   0.968    -.9426414    .9817099
        grow |  -.0901347   .1213989    -0.74   0.458    -.3280722    .1478028
incidenc~413 |     .96016   .3138789     3.06   0.002     .3449686    1.575351
   gwf_party |   .7131016   .7736928     0.92   0.357    -.8033085    2.229512
gwf_military |   .7554916   .5419522     1.39   0.163    -.3067151    1.817698
gwf_monarchy |   .1202301   1.179448     0.10   0.919    -2.191445    2.431905
gwf_personal |   1.115763   .4638057     2.41   0.016     .2067207    2.024806
-------------+----------------------------------------------------------------
       /cut1 |  -32.51378    6.03463                     -44.34144   -20.68612
       /cut2 |  -26.99674   5.932959                     -38.62513   -15.36835
       /cut3 |  -25.13507   5.921358                     -36.74072   -13.52942
       /cut4 |  -22.60088   5.898049                     -34.16084   -11.04091
       /cut5 |  -19.58845   5.871812                     -31.09699   -8.079915
       /cut6 |  -17.76412   5.919742                      -29.3666    -6.16164
-------------+----------------------------------------------------------------
   /sigma2_u |   3.570325   .9176081                       2.15745    5.908466
------------------------------------------------------------------------------

. 
.                 * 2002-2010 only *
.                 xtreg ONDD_score $unit $cvar gwf_party gwf_military gwf_monar
> chy gwf_pers if year>=2002,re vce(cluster cow)

Random-effects GLS regression                   Number of obs     =        811
Group variable: cowcode                         Number of groups  =         97

R-sq:                                           Obs per group:
     within  = 0.1042                                         min =          1
     between = 0.5846                                         avg =        8.4
     overall = 0.4827                                         max =          9

                                                Wald chi2(25)     =          .
corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =          .

                               (Std. Err. adjusted for 97 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        year |
       1992  |          0  (empty)
       1993  |          0  (empty)
       1994  |          0  (empty)
       1995  |          0  (empty)
       1996  |          0  (empty)
       1997  |          0  (empty)
       1998  |          0  (empty)
       1999  |          0  (empty)
       2000  |          0  (empty)
       2001  |          0  (empty)
       2002  |  -.0372449   .1339168    -0.28   0.781     -.299717    .2252272
       2003  |  -.0660076   .1289624    -0.51   0.609    -.3187693     .186754
       2004  |  -.1959193   .1210727    -1.62   0.106    -.4332175    .0413789
       2005  |  -.2703511   .1051957    -2.57   0.010    -.4765309   -.0641713
       2006  |  -.3277064    .088609    -3.70   0.000    -.5013769   -.1540359
       2007  |  -.2686573   .0757228    -3.55   0.000    -.4170712   -.1202435
       2008  |  -.2163014   .0651397    -3.32   0.001    -.3439729   -.0886298
       2009  |  -.0795689   .0525355    -1.51   0.130    -.1825365    .0233987
       2010  |          0  (omitted)
             |
       meast |   .5464951    .561085     0.97   0.330    -.5532112    1.646201
    americas |   .7939673   .4551769     1.74   0.081     -.098163    1.686098
         ssa |  -.0744908   .4213372    -0.18   0.860    -.9002965    .7513149
        asia |    .203605   .4476006     0.45   0.649    -.6736759    1.080886
       easia |  -.5621251   .5330063    -1.05   0.292    -1.606798     .482548
       gtime |  -.1680913   .0823316    -2.04   0.041    -.3294583   -.0067242
       oilpc |   .1343418   .0519613     2.59   0.010     .0324995    .2361841
      allexp |   .1768821   .1128204     1.57   0.117    -.0442418    .3980061
     lgdpcap |  -.7528348   .1309492    -5.75   0.000     -1.00949   -.4961791
        lpop |   .0767685   .0825045     0.93   0.352    -.0849374    .2384743
   lopenness |   .3347736   .2525045     1.33   0.185    -.1601263    .8296734
        grow |  -.0043378   .0468707    -0.09   0.926    -.0962027     .087527
incidenc~413 |   .1329795   .0818436     1.62   0.104    -.0274311      .29339
   gwf_party |   .5529116    .297726     1.86   0.063    -.0306206    1.136444
gwf_military |   .1201768   .1273679     0.94   0.345    -.1294597    .3698132
gwf_monarchy |   .0062497   .5081774     0.01   0.990    -.9897597    1.002259
gwf_personal |   .8125977   .2067081     3.93   0.000     .4074572    1.217738
       _cons |   6.383872   2.029361     3.15   0.002     2.406398    10.36135
-------------+----------------------------------------------------------------
     sigma_u |  .82286031
     sigma_e |  .55360626
         rho |  .68840337   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                 xtologit ONDD_score $unit $cvar gwf_party gwf_military gwf_mo
> narchy gwf_pers if year>=2002,vce(cluster cow)

Fitting comparison model:

Iteration 0:   log likelihood = -1398.2624  
Iteration 1:   log likelihood = -1129.4764  
Iteration 2:   log likelihood = -1087.0947  
Iteration 3:   log likelihood = -1086.1479  
Iteration 4:   log likelihood = -1086.1454  
Iteration 5:   log likelihood = -1086.1454  

Refining starting values:

Grid node 0:   log likelihood = -927.70941

Fitting full model:

Iteration 0:   log pseudolikelihood = -927.70941  
Iteration 1:   log pseudolikelihood = -794.17531  
Iteration 2:   log pseudolikelihood = -767.93721  
Iteration 3:   log pseudolikelihood = -762.64121  
Iteration 4:   log pseudolikelihood = -761.94801  
Iteration 5:   log pseudolikelihood = -761.93928  
Iteration 6:   log pseudolikelihood = -761.93927  

Random-effects ordered logistic regression      Number of obs     =        811
Group variable: cowcode                         Number of groups  =         97

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =        8.4
                                                              max =          9

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(25)     =      97.59
Log pseudolikelihood  = -761.93927              Prob > chi2       =     0.0000

                               (Std. Err. adjusted for 97 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
             |
        year |
       2003  |  -.1440214   .2348565    -0.61   0.540    -.6043317    .3162888
       2004  |  -.6617133   .2991175    -2.21   0.027    -1.247973   -.0754537
       2005  |  -1.099367   .3832569    -2.87   0.004    -1.850537   -.3481978
       2006  |  -1.324291   .4334894    -3.05   0.002    -2.173914   -.4746669
       2007  |  -1.116591   .4546246    -2.46   0.014    -2.007639   -.2255433
       2008  |  -.8963116   .4929474    -1.82   0.069    -1.862471    .0698475
       2009  |  -.4139448   .4809316    -0.86   0.389    -1.356553    .5286639
       2010  |  -.0284707   .5217413    -0.05   0.956    -1.051065    .9941236
             |
       meast |   2.334581   2.306813     1.01   0.312    -2.186689    6.855852
    americas |   3.033652   1.806054     1.68   0.093    -.5061486    6.573453
         ssa |  -.4829122    1.74686    -0.28   0.782    -3.906696    2.940871
        asia |   .8582054   1.835039     0.47   0.640    -2.738405    4.454816
       easia |  -2.509933   2.212365    -1.13   0.257    -6.846089    1.826223
       gtime |  -.6299223   .3571204    -1.76   0.078    -1.329865    .0700208
       oilpc |   .5378293   .2318204     2.32   0.020     .0834697    .9921889
      allexp |     .65036   .5103699     1.27   0.203    -.3499465    1.650667
     lgdpcap |  -3.155965   .5742482    -5.50   0.000    -4.281471   -2.030459
        lpop |   .2851097   .3645402     0.78   0.434    -.4293759    .9995954
   lopenness |   .8884761   .7475382     1.19   0.235    -.5766718    2.353624
        grow |   .0132136   .1945338     0.07   0.946    -.3680658    .3944929
incidenc~413 |   .5537144   .3277223     1.69   0.091    -.0886095    1.196038
   gwf_party |   2.054416   1.339714     1.53   0.125    -.5713756    4.680208
gwf_military |   .2352865   .4715727     0.50   0.618     -.688979    1.159552
gwf_monarchy |  -.0021334   2.135372    -0.00   0.999    -4.187385    4.183118
gwf_personal |   3.051392   1.016545     3.00   0.003     1.059001    5.043784
-------------+----------------------------------------------------------------
       /cut1 |  -23.27926   8.266705                      -39.4817   -7.076815
       /cut2 |  -18.87376   8.249628                     -35.04274    -2.70479
       /cut3 |  -15.05758   8.214096                     -31.15691    1.041753
       /cut4 |  -10.68456   8.180615                     -26.71827    5.349147
       /cut5 |  -6.638919   8.196723                      -22.7042    9.426362
       /cut6 |  -3.619327   8.320844                     -19.92788    12.68923
-------------+----------------------------------------------------------------
   /sigma2_u |   12.38279   4.317711                      6.251957    24.52567
------------------------------------------------------------------------------

.                 
.                 * Compare personalist to all others *
.                 xtreg ONDD_score $unit $cvar gwf_pers,re vce(cluster cow)

Random-effects GLS regression                   Number of obs     =      1,586
Group variable: cowcode                         Number of groups  =        102

R-sq:                                           Obs per group:
     within  = 0.4015                                         min =          1
     between = 0.7066                                         avg =       15.5
     overall = 0.5585                                         max =         19

                                                Wald chi2(32)     =     827.05
corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000

                              (Std. Err. adjusted for 102 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        year |
       1993  |  -.5196363    .077929    -6.67   0.000    -.6723743   -.3668984
       1994  |  -.7697951   .1110197    -6.93   0.000    -.9873897   -.5522005
       1995  |  -.8751023   .1180968    -7.41   0.000    -1.106568    -.643637
       1996  |  -.9107093   .1157406    -7.87   0.000    -1.137557   -.6838618
       1997  |  -.8362389   .1214394    -6.89   0.000    -1.074256   -.5982221
       1998  |  -.7958049    .121158    -6.57   0.000     -1.03327   -.5583396
       1999  |   -.772888   .1210848    -6.38   0.000     -1.01021   -.5355661
       2000  |   -.805546   .1203484    -6.69   0.000    -1.041425   -.5696674
       2001  |  -1.107259   .1468218    -7.54   0.000    -1.395025   -.8194937
       2002  |   .4718294   .1564897     3.02   0.003     .1651152    .7785436
       2003  |   .4627733   .1572017     2.94   0.003     .1546635     .770883
       2004  |   .3283111   .1630134     2.01   0.044     .0088107    .6478114
       2005  |   .2705341   .1673785     1.62   0.106    -.0575217    .5985899
       2006  |   .1871912   .1649353     1.13   0.256     -.136076    .5104583
       2007  |   .2511426   .1724576     1.46   0.145    -.0868681    .5891534
       2008  |   .3170116   .1840203     1.72   0.085    -.0436616    .6776847
       2009  |   .4328802   .1776085     2.44   0.015      .084774    .7809864
       2010  |   .5563163   .1845097     3.02   0.003     .1946839    .9179488
             |
       meast |   .5762343   .3802648     1.52   0.130    -.1690709     1.32154
    americas |   .4546115   .3290383     1.38   0.167    -.1902917    1.099515
         ssa |   .1059029   .3465474     0.31   0.760    -.5733175    .7851233
        asia |   .3658891   .3705284     0.99   0.323    -.3603333    1.092111
       easia |  -.0790103   .3953968    -0.20   0.842    -.8539738    .6959531
       gtime |  -.1409848   .0578953    -2.44   0.015    -.2544576   -.0275121
       oilpc |   .1504157   .0421969     3.56   0.000     .0677113    .2331202
      allexp |   .4544954   .1603638     2.83   0.005     .1401881    .7688028
     lgdpcap |  -.7660551   .1163598    -6.58   0.000    -.9941161   -.5379941
        lpop |  -.1796884   .0701721    -2.56   0.010    -.3172232   -.0421536
   lopenness |   .0350349   .1796146     0.20   0.845    -.3170033     .387073
        grow |  -.0284824   .0473392    -0.60   0.547    -.1212656    .0643007
incidenc~413 |   .3120583   .1030698     3.03   0.002     .1100451    .5140714
gwf_personal |   .3998321   .1575881     2.54   0.011     .0909651    .7086991
       _cons |   11.45193   1.942742     5.89   0.000     7.644227    15.25963
-------------+----------------------------------------------------------------
     sigma_u |  .63601373
     sigma_e |  .73295097
         rho |  .42954266   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                 xtologit ONDD_score $unit $cvar  gwf_pers,vce(cluster cow)

Fitting comparison model:

Iteration 0:   log likelihood = -2659.0037  
Iteration 1:   log likelihood = -2029.0224  
Iteration 2:   log likelihood = -1961.1296  
Iteration 3:   log likelihood = -1959.6731  
Iteration 4:   log likelihood = -1959.6691  
Iteration 5:   log likelihood = -1959.6691  

Refining starting values:

Grid node 0:   log likelihood =  -1766.296

Fitting full model:

Iteration 0:   log pseudolikelihood =  -1766.296  
Iteration 1:   log pseudolikelihood = -1696.6566  
Iteration 2:   log pseudolikelihood = -1691.4307  
Iteration 3:   log pseudolikelihood = -1691.0604  
Iteration 4:   log pseudolikelihood = -1691.0588  
Iteration 5:   log pseudolikelihood = -1691.0588  

Random-effects ordered logistic regression      Number of obs     =      1,586
Group variable: cowcode                         Number of groups  =        102

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       15.5
                                                              max =         19

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(32)     =     281.57
Log pseudolikelihood  = -1691.0588              Prob > chi2       =     0.0000

                              (Std. Err. adjusted for 102 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
             |
        year |
       1993  |  -1.467779   .2415836    -6.08   0.000    -1.941274   -.9942841
       1994  |   -2.39232   .3560344    -6.72   0.000    -3.090134   -1.694505
       1995  |  -2.674885   .3829156    -6.99   0.000    -3.425386   -1.924384
       1996  |  -2.785945   .3799686    -7.33   0.000    -3.530669    -2.04122
       1997  |  -2.572446   .3913926    -6.57   0.000    -3.339562   -1.805331
       1998  |  -2.435206   .3844973    -6.33   0.000    -3.188807   -1.681605
       1999  |  -2.359546   .3868307    -6.10   0.000     -3.11772   -1.601371
       2000  |   -2.49712   .3844485    -6.50   0.000    -3.250625   -1.743615
       2001  |  -3.565713   .5168411    -6.90   0.000    -4.578703   -2.552723
       2002  |    1.18382   .4009606     2.95   0.003     .3979518    1.969688
       2003  |   1.167848   .3934852     2.97   0.003     .3966316    1.939065
       2004  |   .8569272   .4085513     2.10   0.036     .0561814    1.657673
       2005  |   .6513168   .4262929     1.53   0.127    -.1842019    1.486836
       2006  |   .4154202   .4208436     0.99   0.324    -.4094181    1.240259
       2007  |   .5284897   .4459489     1.19   0.236     -.345554    1.402533
       2008  |   .6752285    .465328     1.45   0.147    -.2367975    1.587255
       2009  |   .9513677    .445119     2.14   0.033     .0789506    1.823785
       2010  |   1.317378   .4504625     2.92   0.003     .4344873    2.200268
             |
       meast |   2.092015   1.146288     1.83   0.068    -.1546695    4.338699
    americas |   1.489261   1.069919     1.39   0.164    -.6077405    3.586263
         ssa |   .3160374   1.113491     0.28   0.777    -1.866365     2.49844
        asia |   1.249154   1.103222     1.13   0.258    -.9131205     3.41143
       easia |   -.222507   1.162234    -0.19   0.848    -2.500445    2.055431
       gtime |  -.3339109   .1661871    -2.01   0.045    -.6596316   -.0081903
       oilpc |   .4538339   .1293369     3.51   0.000     .2003382    .7073297
      allexp |   1.156955   .4412249     2.62   0.009       .29217     2.02174
     lgdpcap |  -2.396809   .3682644    -6.51   0.000    -3.118594   -1.675024
        lpop |  -.5699038   .2099657    -2.71   0.007    -.9814289   -.1583786
   lopenness |  -.0197475   .4859172    -0.04   0.968    -.9721278    .9326327
        grow |  -.0898801    .120862    -0.74   0.457    -.3267653     .147005
incidenc~413 |   1.012446   .3256844     3.11   0.002     .3741168    1.650776
gwf_personal |    .932231   .4134283     2.25   0.024     .1219264    1.742536
-------------+----------------------------------------------------------------
       /cut1 |  -32.64307   6.040625                     -44.48247   -20.80366
       /cut2 |  -27.16444   5.935819                     -38.79843   -15.53045
       /cut3 |  -25.31037   5.922435                     -36.91813   -13.70261
       /cut4 |  -22.78118   5.900597                     -34.34614   -11.21623
       /cut5 |   -19.7803   5.868455                     -31.28226   -8.278337
       /cut6 |  -17.97466   5.904945                     -29.54814   -6.401178
-------------+----------------------------------------------------------------
   /sigma2_u |   3.481356   .8844173                      2.115953    5.727842
------------------------------------------------------------------------------

. 
.                 * Just panels with more than 3 years *
.                 xtreg ONDD_score $unit $cvar gwf_party gwf_military gwf_monar
> chy gwf_pers if count>=4,re vce(cluster cow)

Random-effects GLS regression                   Number of obs     =      1,508
Group variable: cowcode                         Number of groups  =         96

R-sq:                                           Obs per group:
     within  = 0.4108                                         min =          4
     between = 0.6695                                         avg =       15.7
     overall = 0.5533                                         max =         19

                                                Wald chi2(35)     =     772.02
corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000

                               (Std. Err. adjusted for 96 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        year |
       1993  |  -.4613481   .0909661    -5.07   0.000    -.6396384   -.2830579
       1994  |  -.7783016    .120659    -6.45   0.000    -1.014789   -.5418143
       1995  |  -.7964636   .1301077    -6.12   0.000     -1.05147   -.5414572
       1996  |  -.8133711   .1289295    -6.31   0.000    -1.066068   -.5606739
       1997  |  -.7307064   .1316797    -5.55   0.000    -.9887939   -.4726189
       1998  |  -.6930521   .1357822    -5.10   0.000    -.9591803   -.4269238
       1999  |  -.6590471   .1376073    -4.79   0.000    -.9287525   -.3893417
       2000  |   -.685166   .1410509    -4.86   0.000    -.9616207   -.4087113
       2001  |   -1.00069   .1697403    -5.90   0.000    -1.333375   -.6680054
       2002  |   .5796478   .1790227     3.24   0.001     .2287697    .9305258
       2003  |   .5687658   .1813147     3.14   0.002     .2133955    .9241361
       2004  |     .42846   .1920146     2.23   0.026     .0521183    .8048018
       2005  |    .339724   .1951293     1.74   0.082    -.0427223    .7221703
       2006  |   .2803378   .1913752     1.46   0.143    -.0947507    .6554264
       2007  |   .3534002   .2005122     1.76   0.078    -.0395965    .7463968
       2008  |   .4188726   .2150214     1.95   0.051    -.0025616    .8403069
       2009  |   .5172244   .2120668     2.44   0.015      .101581    .9328678
       2010  |   .6434825   .2217364     2.90   0.004     .2088872    1.078078
             |
       meast |   .6193217   .4409944     1.40   0.160    -.2450115    1.483655
    americas |   .4530251   .3509199     1.29   0.197    -.2347654    1.140816
         ssa |   .1135968   .3762923     0.30   0.763    -.6239225    .8511162
        asia |   .2473828   .3926975     0.63   0.529    -.5222901    1.017056
       easia |  -.1252901   .4508745    -0.28   0.781    -1.008988    .7584076
       gtime |  -.1713862    .079906    -2.14   0.032     -.327999   -.0147734
       oilpc |   .1569917   .0458313     3.43   0.001      .067164    .2468193
      allexp |   .4284633   .1650812     2.60   0.009     .1049101    .7520164
     lgdpcap |  -.7419279   .1302512    -5.70   0.000    -.9972156   -.4866402
        lpop |  -.1776866   .0768504    -2.31   0.021    -.3283106   -.0270626
   lopenness |    .085907   .1908044     0.45   0.653    -.2880628    .4598769
        grow |  -.0196479   .0546552    -0.36   0.719    -.1267701    .0874743
incidenc~413 |   .2303436   .1012938     2.27   0.023     .0318114    .4288759
   gwf_party |   .0640551   .3016857     0.21   0.832     -.527238    .6553482
gwf_military |   .4497127   .2601443     1.73   0.084    -.0601608    .9595861
gwf_monarchy |  -.2214026   .3808216    -0.58   0.561    -.9677993     .524994
gwf_personal |   .4890958   .1949975     2.51   0.012     .1069077     .871284
       _cons |   10.98124   2.150291     5.11   0.000     6.766748    15.19573
-------------+----------------------------------------------------------------
     sigma_u |  .65554855
     sigma_e |  .72388285
         rho |  .45058325   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                 xtologit ONDD_score $unit $cvar gwf_party gwf_military gwf_mo
> narchy gwf_pers if count>=4,  vce(cluster cow)

Fitting comparison model:

Iteration 0:   log likelihood = -2516.5527  
Iteration 1:   log likelihood = -1925.4529  
Iteration 2:   log likelihood = -1860.0846  
Iteration 3:   log likelihood =   -1858.61  
Iteration 4:   log likelihood = -1858.6061  
Iteration 5:   log likelihood = -1858.6061  

Refining starting values:

Grid node 0:   log likelihood =  -1667.897

Fitting full model:

Iteration 0:   log pseudolikelihood =  -1667.897  
Iteration 1:   log pseudolikelihood = -1595.8267  
Iteration 2:   log pseudolikelihood = -1590.1986  
Iteration 3:   log pseudolikelihood = -1589.7523  
Iteration 4:   log pseudolikelihood = -1589.7495  
Iteration 5:   log pseudolikelihood = -1589.7495  

Random-effects ordered logistic regression      Number of obs     =      1,508
Group variable: cowcode                         Number of groups  =         96

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          4
                                                              avg =       15.7
                                                              max =         19

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(35)     =     314.81
Log pseudolikelihood  = -1589.7495              Prob > chi2       =     0.0000

                               (Std. Err. adjusted for 96 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
             |
        year |
       1993  |  -1.301729   .2666542    -4.88   0.000    -1.824361   -.7790962
       1994  |  -2.424557   .4065102    -5.96   0.000    -3.221302   -1.627812
       1995  |  -2.506331   .4299482    -5.83   0.000    -3.349014   -1.663648
       1996  |  -2.583739   .4289053    -6.02   0.000    -3.424378     -1.7431
       1997  |  -2.342021   .4325261    -5.41   0.000    -3.189757   -1.494286
       1998  |  -2.222293    .438448    -5.07   0.000    -3.081635   -1.362951
       1999  |  -2.111725   .4411436    -4.79   0.000    -2.976351   -1.247099
       2000  |  -2.206045   .4498482    -4.90   0.000    -3.087731   -1.324359
       2001  |  -3.348745   .5880555    -5.69   0.000    -4.501313   -2.196178
       2002  |   1.489712   .4722355     3.15   0.002      .564147    2.415276
       2003  |   1.475081   .4704964     3.14   0.002     .5529256    2.397237
       2004  |   1.160757   .5021509     2.31   0.021     .1765591    2.144954
       2005  |   .8718958   .5190859     1.68   0.093    -.1454939    1.889285
       2006  |   .6744827   .5123795     1.32   0.188    -.3297626    1.678728
       2007  |   .8054833   .5402751     1.49   0.136    -.2534365    1.864403
       2008  |   .9603221   .5664544     1.70   0.090    -.1499081    2.070552
       2009  |   1.182766   .5548236     2.13   0.033     .0953315      2.2702
       2010  |   1.555232    .562278     2.77   0.006     .4531875    2.657277
             |
       meast |   1.756958   1.280384     1.37   0.170    -.7525485    4.266465
    americas |   1.297636    1.10487     1.17   0.240    -.8678696    3.463141
         ssa |   .0840869   1.173969     0.07   0.943    -2.216849    2.385023
        asia |   .7091815   1.139928     0.62   0.534    -1.525037      2.9434
       easia |  -.6880869   1.338228    -0.51   0.607    -3.310966    1.934792
       gtime |  -.3879243   .2253203    -1.72   0.085    -.8295441    .0536955
       oilpc |   .4864494   .1424963     3.41   0.001     .2071617    .7657371
      allexp |   1.113774   .4521493     2.46   0.014     .2275781    1.999971
     lgdpcap |  -2.398328   .4078684    -5.88   0.000    -3.197735   -1.598921
        lpop |  -.5678719   .2214697    -2.56   0.010    -1.001944   -.1337993
   lopenness |   .0716355   .5270207     0.14   0.892    -.9613061    1.104577
        grow |  -.0746528   .1476178    -0.51   0.613    -.3639783    .2146727
incidenc~413 |   .8009112   .2996135     2.67   0.008     .2136795    1.388143
   gwf_party |   .2673016    .854257     0.31   0.754    -1.407011    1.941615
gwf_military |   1.264184   .6944107     1.82   0.069    -.0968363    2.625204
gwf_monarchy |  -.1791244   1.157873    -0.15   0.877    -2.448515    2.090266
gwf_personal |   1.146984   .5427351     2.11   0.035     .0832427    2.210725
-------------+----------------------------------------------------------------
       /cut1 |  -32.38063    6.45793                     -45.03794   -19.72332
       /cut2 |  -26.78527   6.353227                     -39.23736   -14.33317
       /cut3 |  -24.86592   6.343899                     -37.29973    -12.4321
       /cut4 |  -22.27108   6.320346                     -34.65873   -9.883429
       /cut5 |  -19.35002   6.309207                     -31.71584   -6.984199
       /cut6 |  -17.43398   6.392368                     -29.96279   -4.905172
-------------+----------------------------------------------------------------
   /sigma2_u |   3.604142   .8916568                      2.219303    5.853118
------------------------------------------------------------------------------

. 
.                 * AR(1) *
.                 xtregar ONDD_score meast americas ssa asia easia $cvar gwf_pa
> rty gwf_military gwf_monarchy gwf_pers,rhotype(tscorr)

RE GLS regression with AR(1) disturbances       Number of obs     =      1,586
Group variable: cowcode                         Number of groups  =        102

R-sq:                                           Obs per group:
     within  = 0.0575                                         min =          1
     between = 0.6307                                         avg =       15.5
     overall = 0.3773                                         max =         19

                                                Wald chi2(18)     =     216.41
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.1234   0.2587     0.3635     0.3635   0.3635

------------------------------------------------------------------------------
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       meast |   .4021295   .3259266     1.23   0.217     -.236675    1.040934
    americas |   .4530592   .2640977     1.72   0.086    -.0645627    .9706811
         ssa |   .3766301   .2707367     1.39   0.164    -.1540041    .9072642
        asia |   .6052529   .3059231     1.98   0.048     .0056545    1.204851
       easia |   -.227655   .3373157    -0.67   0.500    -.8887816    .4334716
       gtime |   .0373548    .038688     0.97   0.334    -.0384722    .1131818
       oilpc |   .1552845   .0257331     6.03   0.000     .1048486    .2057203
      allexp |   .2363183   .0599975     3.94   0.000     .1187253    .3539113
     lgdpcap |   -.680597   .0783491    -8.69   0.000    -.8341584   -.5270357
        lpop |  -.0541786   .0590013    -0.92   0.358     -.169819    .0614617
   lopenness |   .2121931   .1095808     1.94   0.053    -.0025814    .4269675
        grow |   -.028862   .0319178    -0.90   0.366    -.0914197    .0336958
incidenc~413 |   .0714406     .06883     1.04   0.299    -.0634637    .2063448
   gwf_party |  -.1084839   .1497734    -0.72   0.469    -.4020343    .1850665
gwf_military |   .0799435   .1656558     0.48   0.629    -.2447358    .4046229
gwf_monarchy |  -.4149783    .354759    -1.17   0.242    -1.110293    .2803367
gwf_personal |    .468728   .1229147     3.81   0.000     .2278197    .7096363
       _cons |   7.454353   1.373238     5.43   0.000     4.762855    10.14585
-------------+----------------------------------------------------------------
      rho_ar |  .64614491   (estimated autocorrelation coefficient)
     sigma_u |  .46784474
     sigma_e |  .65030993
     rho_fov |  .34104852   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                 xtgls ONDD_score meast americas ssa asia easia $cvar gwf_part
> y gwf_military gwf_monarchy gwf_pers,corr(ar1) panel(het) force
(note: 2 observations dropped because only 1 obs in group)

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        heteroskedastic
Correlation:   common AR(1) coefficient for all panels  (0.7313)

Estimated covariances      =       100          Number of obs     =      1,584
Estimated autocorrelations =         1          Number of groups  =        100
Estimated coefficients     =        18          Obs per group:
                                                              min =          2
                                                              avg =      15.84
                                                              max =         19
                                                Wald chi2(17)     =     869.44
                                                Prob > chi2       =     0.0000

------------------------------------------------------------------------------
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       meast |   .4347868       .222     1.96   0.050    -.0003251    .8698988
    americas |   .4732849   .1949735     2.43   0.015     .0911439    .8554259
         ssa |   .6481047   .1974529     3.28   0.001     .2611042    1.035105
        asia |   .9249941    .205102     4.51   0.000     .5230016    1.326987
       easia |   .1028287   .2235478     0.46   0.646    -.3353169    .5409742
       gtime |    .044886   .0329994     1.36   0.174    -.0197916    .1095636
       oilpc |   .1530245   .0173222     8.83   0.000     .1190736    .1869754
      allexp |    .124666      .0525     2.37   0.018     .0217679     .227564
     lgdpcap |  -.6861891   .0444204   -15.45   0.000    -.7732513   -.5991268
        lpop |  -.1449785   .0391465    -3.70   0.000    -.2217043   -.0682527
   lopenness |   .1037794   .0804187     1.29   0.197    -.0538383    .2613971
        grow |  -.0368198   .0253075    -1.45   0.146    -.0864217     .012782
incidenc~413 |   .1081907   .0497127     2.18   0.030     .0107556    .2056257
   gwf_party |  -.1431168   .1171433    -1.22   0.222    -.3727135    .0864798
gwf_military |   .1388057   .1422286     0.98   0.329    -.1399572    .4175686
gwf_monarchy |  -.3329281    .175726    -1.89   0.058    -.6773448    .0114886
gwf_personal |   .5095877    .100633     5.06   0.000     .3123506    .7068249
       _cons |   9.228385   .9149058    10.09   0.000     7.435203    11.02157
------------------------------------------------------------------------------

.                  
.                 * HAC *
.                  ivreg2 ONDD_score meast americas ssa asia easia $cvar gwf_pa
> rty gwf_military gwf_monarchy gwf_pers, rob bw(auto)

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=    37
  Automatic bw selection according to Newey-West (1994)
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     1586
                                                      F( 17,  1568) =    17.49
                                                      Prob > F      =   0.0000
Total (centered) SS     =  3132.459647                Centered R2   =   0.3997
Total (uncentered) SS   =        20837                Uncentered R2 =   0.9098
Residual SS             =    1880.4095                Root MSE      =    1.089

------------------------------------------------------------------------------
             |               Robust
  ONDD_score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       meast |   .2972535   .3934192     0.76   0.450     -.473834    1.068341
    americas |   .5018873   .3083874     1.63   0.104    -.1025408    1.106315
         ssa |   .2979324    .328462     0.91   0.364    -.3458414    .9417062
        asia |   .3251419   .3590593     0.91   0.365    -.3786014    1.028885
       easia |  -.2242293   .3986974    -0.56   0.574    -1.005662    .5572032
       gtime |  -.0037672   .0612912    -0.06   0.951    -.1238958    .1163614
       oilpc |   .1791048   .0267751     6.69   0.000     .1266266     .231583
      allexp |   .5151284    .218932     2.35   0.019     .0860296    .9442272
     lgdpcap |   -.724036   .0830572    -8.72   0.000    -.8868252   -.5612469
        lpop |  -.0924428   .0656793    -1.41   0.159    -.2211718    .0362863
   lopenness |   .3201936     .18326     1.75   0.081    -.0389895    .6793767
        grow |  -.0001037   .0651615    -0.00   0.999    -.1278179    .1276105
incidenc~413 |   .4164121   .1113927     3.74   0.000     .1980864    .6347378
   gwf_party |  -.1410976   .2258158    -0.62   0.532    -.5836883    .3014932
gwf_military |     .21696   .2016244     1.08   0.282    -.1782165    .6121365
gwf_monarchy |  -.2245699   .3428439    -0.66   0.512    -.8965317    .4473918
gwf_personal |   .5516024    .206724     2.67   0.008     .1464308    .9567739
       _cons |   7.809173    1.75456     4.45   0.000     4.370299    11.24805
------------------------------------------------------------------------------
Included instruments: meast americas ssa asia easia gtime oilpc allexp lgdpcap
                      lpop lopenness grow incidencev413 gwf_party gwf_military
                      gwf_monarchy gwf_personal
------------------------------------------------------------------------------

.                  
.         
.         ****************************
.         *** Export concentration ***
.         ****************************
.         cd "$dir"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files

.         use temp,clear

.         gen p_exp = logit(hhi_2digit_p_e)
(1,152 missing values generated)

.         gen s_exp = logit(hhi_2digit_s_e)
(1,162 missing values generated)

.         gen time = year-1979

.         global x = "lgdpcap lpop lopen oilpc time"

.         global region = "americas asia easia meast ssa"

.         global regime = "gwf_personal"

.         xtset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.         
.                 * Reported Primary sector model *
.                         *  RE w. ar1 errors *
.                         xtregar p_exp gwf_pers $region $x if (oecd2==0 | (cow
> ==70 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,074
Group variable: cowcode                         Number of groups  =        106

R-sq:                                           Obs per group:
     within  = 0.1036                                         min =          1
     between = 0.5020                                         avg =       19.6
     overall = 0.4011                                         max =         31

                                                Wald chi2(12)     =     158.54
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.4356   0.6039     0.7083     0.7109   0.7109

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .1370426   .0696906     1.97   0.049     .0004515    .2736337
    americas |   .3028683   .2991199     1.01   0.311     -.283396    .8891326
        asia |    .486202   .3441671     1.41   0.158    -.1883531    1.160757
       easia |  -.0314134   .3978308    -0.08   0.937    -.8111475    .7483207
       meast |   1.743242   .3138505     5.55   0.000     1.128106    2.358377
         ssa |   1.264281   .2803398     4.51   0.000     .7148249    1.813737
     lgdpcap |   .0470067   .0724086     0.65   0.516    -.0949115    .1889249
        lpop |  -.0813229   .0656972    -1.24   0.216     -.210087    .0474412
   lopenness |   .2005897   .0629661     3.19   0.001     .0771783    .3240011
       oilpc |   .1270183   .0197831     6.42   0.000     .0882441    .1657925
        time |  -.0145543   .0033917    -4.29   0.000    -.0212019   -.0079067
       _cons |  -1.236556   1.341405    -0.92   0.357    -3.865661    1.392549
-------------+----------------------------------------------------------------
      rho_ar |  .75831374   (estimated autocorrelation coefficient)
     sigma_u |  .76824645
     sigma_e |  .34236362
     rho_fov |  .83430833   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         est stor exp1

.                 * Reported Secondary sector model *
.                         *  RE w. ar1 errors *
.                         xtregar s_exp gwf_pers $region $x if (oecd2==0 | (cow
> ==70 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,065
Group variable: cowcode                         Number of groups  =        106

R-sq:                                           Obs per group:
     within  = 0.0310                                         min =          1
     between = 0.3648                                         avg =       19.5
     overall = 0.2874                                         max =         31

                                                Wald chi2(12)     =      93.39
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.3238   0.5310     0.6658     0.6714   0.6714

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0224929   .0773632    -0.29   0.771     -.174122    .1291362
    americas |  -.0790832   .2445966    -0.32   0.746    -.5584838    .4003174
        asia |     1.1578   .2834179     4.09   0.000     .6023117    1.713289
       easia |   .7617952   .3258449     2.34   0.019     .1231509    1.400439
       meast |   .5562313   .2575229     2.16   0.031     .0514957    1.060967
         ssa |   .6802489   .2310528     2.94   0.003     .2273937    1.133104
     lgdpcap |  -.2200842   .0656606    -3.35   0.001    -.3487766   -.0913918
        lpop |  -.2731377   .0561359    -4.87   0.000     -.383162   -.1631134
   lopenness |  -.0533482   .0721296    -0.74   0.460    -.1947196    .0880231
       oilpc |   .0672246   .0204004     3.30   0.001     .0272406    .1072087
        time |  -.0022744   .0032839    -0.69   0.489    -.0087107    .0041618
       _cons |   4.459846   1.204027     3.70   0.000     2.099996    6.819695
-------------+----------------------------------------------------------------
      rho_ar |  .66847888   (estimated autocorrelation coefficient)
     sigma_u |  .60558667
     sigma_e |  .41337429
     rho_fov |  .68215401   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         est stor exp2

.         
.                 *****************
.                 *** Figure 11 ***
.                 *****************
.                         * Plot estimates *
.                         label var lpop "Population"

.                         label var lgdpcap "GDP pc"

.                         label var lopen "Open"

.                         label var oilpc "Oil rents"

.                         label var gwf_personal "Personalist"

.                         coefplot (exp1, msymbol(D)) (exp2, msymbol(T)), title
> ("Export concentration")/*
>                         */ scheme(lean2) drop($region _cons time) /*
>                         */ order(gwf_personal gwf_monarchy gwf_party gwf_mili
> tary oilpc) /*
>                         */ xlab(-.4 (.1) .3) xline(0, lpattern(dash)) grid(gl
> color(gs15)) mfcolor(white) /*
>                         */ ysize(3) xsize(2.5)   /*
>                         */ legend(label(3 "Primary sector") label(6 "Secondar
> y sector")   pos(6) ring(1.5) col(3))  /*
>                         */ levels(95 90) xtitle("  Coefficient estimate", hei
> ght(6))    

.                         graph export "$dir\golden\Export-concentration.pdf", 
> as(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Export-concentration.pdf written in PDF format)

.                         graph export "$dir\golden\ISQ-Figure-11.png", as(png)
>  replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-11.png written in PNG format)

.                 
.                 *************************
.                 ***** Primary sector ****
.                 *************************
.                 * Different specifications *
.                         * No controls *
.                         xtregar p_exp gwf_pers if (oecd2==0 | (cow==70 | cow=
> =155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,197
Group variable: cowcode                         Number of groups  =        114

R-sq:                                           Obs per group:
     within  = 0.0000                                         min =          1
     between = 0.0935                                         avg =       19.3
     overall = 0.0325                                         max =         31

                                                Wald chi2(2)      =       2.09
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.3520

------------------- theta --------------------
  min      5%       median        95%      max
0.4764   0.6014     0.7049     0.7063   0.7063

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |    .124115   .0858877     1.45   0.148    -.0442219    .2924518
       _cons |  -.4768705   .1199679    -3.97   0.000    -.7120033   -.2417377
-------------+----------------------------------------------------------------
      rho_ar |  .81824197   (estimated autocorrelation coefficient)
     sigma_u |  1.1882446
     sigma_e |  .41976127
     rho_fov |  .88905183   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         
.                         * other regime types *
.                         xtregar p_exp gwf_pers gwf_party gwf_mil gwf_mon $reg
> ion $x if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,074
Group variable: cowcode                         Number of groups  =        106

R-sq:                                           Obs per group:
     within  = 0.1078                                         min =          1
     between = 0.5037                                         avg =       19.6
     overall = 0.3949                                         max =         31

                                                Wald chi2(15)     =     168.29
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.4327   0.6016     0.7065     0.7091   0.7091

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .1244293   .0716682     1.74   0.083    -.0160378    .2648964
   gwf_party |  -.0593878   .0842051    -0.71   0.481    -.2244267    .1056512
gwf_military |   .0325356   .0610806     0.53   0.594    -.0871801    .1522514
gwf_monarchy |  -.5831745    .222174    -2.62   0.009    -1.018627   -.1477215
    americas |   .2999854   .2967481     1.01   0.312    -.2816302    .8816009
        asia |   .5683025   .3429976     1.66   0.098    -.1039604    1.240566
       easia |    .034017    .397263     0.09   0.932    -.7446042    .8126382
       meast |   1.979763   .3237949     6.11   0.000     1.345137     2.61439
         ssa |    1.32458   .2807638     4.72   0.000      .774293    1.874867
     lgdpcap |    .069779   .0726141     0.96   0.337    -.0725421    .2121001
        lpop |  -.0978706   .0656761    -1.49   0.136    -.2265934    .0308523
   lopenness |    .195341   .0629744     3.10   0.002     .0719134    .3187685
       oilpc |   .1268726   .0197416     6.43   0.000     .0881798    .1655654
        time |  -.0150004   .0034974    -4.29   0.000    -.0218551   -.0081456
       _cons |  -1.113842   1.337182    -0.83   0.405    -3.734671    1.506987
-------------+----------------------------------------------------------------
      rho_ar |  .75788942   (estimated autocorrelation coefficient)
     sigma_u |  .76222815
     sigma_e |  .34251271
     rho_fov |  .83200081   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         
.                         *drop region effects *
.                         xi:xtregar p_exp gwf_pers $region $x if (oecd2==0 | (
> cow==70 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,074
Group variable: cowcode                         Number of groups  =        106

R-sq:                                           Obs per group:
     within  = 0.1036                                         min =          1
     between = 0.5020                                         avg =       19.6
     overall = 0.4011                                         max =         31

                                                Wald chi2(12)     =     158.54
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.4356   0.6039     0.7083     0.7109   0.7109

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .1370426   .0696906     1.97   0.049     .0004515    .2736337
    americas |   .3028683   .2991199     1.01   0.311     -.283396    .8891326
        asia |    .486202   .3441671     1.41   0.158    -.1883531    1.160757
       easia |  -.0314134   .3978308    -0.08   0.937    -.8111475    .7483207
       meast |   1.743242   .3138505     5.55   0.000     1.128106    2.358377
         ssa |   1.264281   .2803398     4.51   0.000     .7148249    1.813737
     lgdpcap |   .0470067   .0724086     0.65   0.516    -.0949115    .1889249
        lpop |  -.0813229   .0656972    -1.24   0.216     -.210087    .0474412
   lopenness |   .2005897   .0629661     3.19   0.001     .0771783    .3240011
       oilpc |   .1270183   .0197831     6.42   0.000     .0882441    .1657925
        time |  -.0145543   .0033917    -4.29   0.000    -.0212019   -.0079067
       _cons |  -1.236556   1.341405    -0.92   0.357    -3.865661    1.392549
-------------+----------------------------------------------------------------
      rho_ar |  .75831374   (estimated autocorrelation coefficient)
     sigma_u |  .76824645
     sigma_e |  .34236362
     rho_fov |  .83430833   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         
.                         * add other sector *
.                         xtregar p_exp s_exp gwf_pers $region $x if (oecd2==0 
> | (cow==70 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,065
Group variable: cowcode                         Number of groups  =        106

R-sq:                                           Obs per group:
     within  = 0.1088                                         min =          1
     between = 0.5340                                         avg =       19.5
     overall = 0.4224                                         max =         31

                                                Wald chi2(13)     =     184.65
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.4212   0.5823     0.6982     0.7008   0.7008

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       s_exp |   .0708373   .0183762     3.85   0.000     .0348207    .1068539
gwf_personal |   .1201863   .0697564     1.72   0.085    -.0165337    .2569063
    americas |   .2833407    .288662     0.98   0.326    -.2824265    .8491078
        asia |   .4207859   .3330701     1.26   0.206    -.2320195    1.073591
       easia |  -.0531842   .3841074    -0.14   0.890    -.8060208    .6996525
       meast |   1.676236   .3031887     5.53   0.000     1.081997    2.270475
         ssa |   1.208016   .2711078     4.46   0.000      .676654    1.739377
     lgdpcap |   .0430848   .0710233     0.61   0.544    -.0961183     .182288
        lpop |  -.0818274   .0639785    -1.28   0.201     -.207223    .0435681
   lopenness |   .1841524   .0632212     2.91   0.004     .0602411    .3080637
       oilpc |   .1369385   .0199597     6.86   0.000     .0978184    .1760587
        time |  -.0128837   .0033782    -3.81   0.000    -.0195048   -.0062626
       _cons |  -1.067614   1.312799    -0.81   0.416    -3.640652    1.505424
-------------+----------------------------------------------------------------
      rho_ar |  .75820367   (estimated autocorrelation coefficient)
     sigma_u |  .73845194
     sigma_e |  .34177184
     rho_fov |  .82358467   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. 
.                         
.                 * Fix up errors in different ways *
.                         * GLS with het & psar1 errors *
.                         xtgls p_exp gwf_pers $region $x if (oecd2==0 | (cow==
> 70 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,cor(psar1) panel(het) force
(note: 3 observations dropped because only 1 obs in group)

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        heteroskedastic
Correlation:   panel-specific AR(1)

Estimated covariances      =       103          Number of obs     =      2,071
Estimated autocorrelations =       103          Number of groups  =        103
Estimated coefficients     =        12          Obs per group:
                                                              min =          2
                                                              avg =    20.1068
                                                              max =         31
                                                Wald chi2(11)     =     966.88
                                                Prob > chi2       =     0.0000

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0741674    .046583     1.59   0.111    -.0171336    .1654684
    americas |   .3749938   .0679638     5.52   0.000     .2417872    .5082004
        asia |   .6972671   .1076424     6.48   0.000     .4862918    .9082424
       easia |  -.0343447   .1266267    -0.27   0.786    -.2825284     .213839
       meast |   1.760691   .1268135    13.88   0.000     1.512141    2.009241
         ssa |   1.310627   .0888691    14.75   0.000     1.136447    1.484808
     lgdpcap |  -.0083353   .0312294    -0.27   0.790    -.0695438    .0528731
        lpop |  -.1330203   .0295755    -4.50   0.000    -.1909871   -.0750534
   lopenness |   .1778184   .0382219     4.65   0.000     .1029048     .252732
       oilpc |   .1327389   .0110614    12.00   0.000      .111059    .1544189
        time |  -.0109483   .0022799    -4.80   0.000    -.0154168   -.0064798
       _cons |  -.1918643   .6088103    -0.32   0.753     -1.38511    1.001382
------------------------------------------------------------------------------

.                         
.                         * ar(1) with FE and logit-transformed DV *
.                         xtregar p_exp gwf_pers $region $x if (oecd2==0 | (cow
> ==70 | cow==155 | cow==640 | cow==732)) &  ///
>                         allregime~=. & year>=1980,fe
note: americas dropped because of collinearity
note: asia dropped because of collinearity
note: easia dropped because of collinearity
note: meast dropped because of collinearity
note: ssa dropped because of collinearity

FE (within) regression with AR(1) disturbances  Number of obs     =      1,968
Group variable: cowcode                         Number of groups  =        103

R-sq:                                           Obs per group:
     within  = 0.0210                                         min =          1
     between = 0.1341                                         avg =       19.1
     overall = 0.1262                                         max =         30

                                                F(6,1859)         =       6.65
corr(u_i, Xb)  = -0.0568                        Prob > F          =     0.0000

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .1319979   .0764899     1.73   0.085    -.0180172    .2820131
    americas |          0  (omitted)
        asia |          0  (omitted)
       easia |          0  (omitted)
       meast |          0  (omitted)
         ssa |          0  (omitted)
     lgdpcap |   .1807634   .1060492     1.70   0.088    -.0272246    .3887513
        lpop |  -.1421697   .0464594    -3.06   0.002    -.2332879   -.0510516
   lopenness |   .2281896     .06786     3.36   0.001     .0950997    .3612794
       oilpc |   .0864321   .0236473     3.66   0.000      .040054    .1328102
        time |  -.0162713   .0044132    -3.69   0.000    -.0249267   -.0076158
       _cons |  -.5054947   .0506413    -9.98   0.000    -.6048144    -.406175
-------------+----------------------------------------------------------------
      rho_ar |  .75831374
     sigma_u |  1.1901603
     sigma_e |  .33702819
     rho_fov |  .92576285   (fraction of variance because of u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(102,1859) = 9.99                    Prob > F = 0.0000

.                         
.                         * newey *
.                         forval i = 1/3 {
  2.                                 qui:newey p_exp gwf_pers $region $x if (oe
> cd2==0 | (cow==70 | cow==155 | cow==640 | cow==732)) &  ///
>                                 allregime~=. & year>=1980,lag(`i') force
  3.                                 lincom gwf_pers
  4.                         }

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2751126   .0906067     3.04   0.002     .0974223    .4528028
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2751126   .1063554     2.59   0.010     .0665374    .4836877
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2751126   .1185803     2.32   0.020      .042563    .5076621
------------------------------------------------------------------------------

.                         
.                 * Drop influential countries, one at a time *
.                         local country = "Venezuela Libya Iraq Nigeria Azerbai
> jan Yemen Guinea Burundi"

.                         foreach c of local country {
  2.                                 qui:xtregar p_exp gwf_pers $region $x if (
> oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==732)) ///
>                                 & allregime~=. & year>=1980 & gwf_country~="`
> c'",re
  3.                                 lincom gwf_pers
  4.                         }

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1060307   .0709201     1.50   0.135    -.0329701    .2450314
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1303259   .0698298     1.87   0.062    -.0065381    .2671898
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1239739   .0696163     1.78   0.075    -.0124715    .2604194
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |    .143512   .0673283     2.13   0.033      .011551     .275473
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1261196   .0689662     1.83   0.067    -.0090516    .2612908
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1299875   .0696887     1.87   0.062    -.0065999    .2665749
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1325646   .0692854     1.91   0.056    -.0032324    .2683615
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1424966   .0688612     2.07   0.039     .0075312     .277462
------------------------------------------------------------------------------

. 
.                 *** Lag DV models ***   
.                         * Lag DV with cluster SE with GLM logit link *
.                         glm hhi_2digit_p_e l.hhi_2digit_p_e gwf_pers $region 
> $x ///
>                         if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==
> 732)) & allregime~=. & year>=1980, ///
>                         fam(bin) link(logit) vce(cluster cow)
note: hhi_2digit_p_ex has noninteger values

Iteration 0:   log pseudolikelihood = -714.95238  
Iteration 1:   log pseudolikelihood = -712.72147  
Iteration 2:   log pseudolikelihood = -712.71605  
Iteration 3:   log pseudolikelihood = -712.71605  

Generalized linear models                         No. of obs      =      1,934
Optimization     : ML                             Residual df     =      1,921
                                                  Scale parameter =          1
Deviance         =  41.23935191                   (1/df) Deviance =   .0214676
Pearson          =  41.60894573                   (1/df) Pearson  =     .02166

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =    .750482
Log pseudolikelihood = -712.7160471               BIC             =  -14495.63

                              (Std. Err. adjusted for 103 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
hhi_2di~p_ex |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
hhi_2di~p_ex |
         L1. |    4.48938   .0955079    47.01   0.000     4.302188    4.676572
             |
gwf_personal |   .0760077   .0265539     2.86   0.004      .023963    .1280523
    americas |   .0674491   .0375824     1.79   0.073    -.0062111    .1411093
        asia |   .0836645   .0475785     1.76   0.079    -.0095878    .1769167
       easia |  -.0212962   .0591151    -0.36   0.719    -.1371598    .0945673
       meast |   .1039387    .046892     2.22   0.027      .012032    .1958454
         ssa |   .0941869   .0369039     2.55   0.011     .0218566    .1665173
     lgdpcap |  -.0165389   .0152903    -1.08   0.279    -.0465074    .0134295
        lpop |   -.022045   .0152903    -1.44   0.149    -.0520135    .0079234
   lopenness |   .0790653    .029702     2.66   0.008     .0208505    .1372801
       oilpc |   .0188408   .0048064     3.92   0.000     .0094204    .0282612
        time |  -.0024106   .0011263    -2.14   0.032    -.0046181    -.000203
       _cons |  -2.191639   .3672505    -5.97   0.000    -2.911437   -1.471841
------------------------------------------------------------------------------

.                         
.                         * Lag DV with logit-transformed DV & ar(1) & het erro
> rs *
.                         xtgls p_exp l.p_exp gwf_pers $region $x ///
>                         if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==
> 732)) & allregime~=. & year>=1980, ///
>                         panel(het) cor(ar1) force
(note: 4 observations dropped because only 1 obs in group)

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        heteroskedastic
Correlation:   common AR(1) coefficient for all panels  (-0.0712)

Estimated covariances      =        99          Number of obs     =      1,930
Estimated autocorrelations =         1          Number of groups  =         99
Estimated coefficients     =        13          Obs per group:
                                                              min =          2
                                                              avg =   19.49495
                                                              max =         31
                                                Wald chi2(12)     =   34140.14
                                                Prob > chi2       =     0.0000

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       p_exp |
         L1. |   .9398942   .0072431   129.76   0.000     .9256979    .9540904
             |
gwf_personal |   .0557302   .0140566     3.96   0.000     .0281798    .0832805
    americas |    .023213   .0165936     1.40   0.162    -.0093099    .0557359
        asia |   .0629054   .0216817     2.90   0.004       .02041    .1054008
       easia |  -.0190502   .0208818    -0.91   0.362    -.0599779    .0218774
       meast |   .0427416   .0203695     2.10   0.036     .0028181    .0826651
         ssa |   .0492123   .0192668     2.55   0.011     .0114501    .0869744
     lgdpcap |  -.0029575   .0062934    -0.47   0.638    -.0152924    .0093774
        lpop |  -.0093502   .0053399    -1.75   0.080    -.0198162    .0011159
   lopenness |    .036771   .0131103     2.80   0.005     .0110753    .0624668
       oilpc |   .0078706   .0022546     3.49   0.000     .0034516    .0122896
        time |  -.0001392    .000571    -0.24   0.807    -.0012584      .00098
       _cons |  -.0985143   .1298333    -0.76   0.448    -.3529829    .1559543
------------------------------------------------------------------------------

. 
.                         * Lag DV with logit-transformed DV & psar(1) & het er
> rors *
.                         xtgls p_exp l.p_exp gwf_pers  $region $x ///
>                         if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==
> 732)) & allregime~=. & year>=1980, ///
>                         panel(het) cor(psar1) force
(note: 4 observations dropped because only 1 obs in group)

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        heteroskedastic
Correlation:   panel-specific AR(1)

Estimated covariances      =        99          Number of obs     =      1,930
Estimated autocorrelations =        99          Number of groups  =         99
Estimated coefficients     =        13          Obs per group:
                                                              min =          2
                                                              avg =   19.49495
                                                              max =         31
                                                Wald chi2(12)     =  126176.22
                                                Prob > chi2       =     0.0000

------------------------------------------------------------------------------
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       p_exp |
         L1. |   .9322625   .0053068   175.67   0.000     .9218613    .9426637
             |
gwf_personal |   .0587479   .0141198     4.16   0.000     .0310735    .0864223
    americas |   .0133115   .0164482     0.81   0.418    -.0189265    .0455494
        asia |   .0544134   .0203992     2.67   0.008     .0144318     .094395
       easia |  -.0282685   .0211023    -1.34   0.180    -.0696282    .0130913
       meast |   .0429582   .0197845     2.17   0.030     .0041813    .0817351
         ssa |   .0558377   .0177444     3.15   0.002     .0210592    .0906161
     lgdpcap |  -.0025426   .0056023    -0.45   0.650     -.013523    .0084378
        lpop |   -.012228   .0046919    -2.61   0.009     -.021424   -.0030321
   lopenness |   .0401968   .0125475     3.20   0.001     .0156041    .0647894
       oilpc |   .0107105   .0021764     4.92   0.000     .0064448    .0149762
        time |  -.0008475   .0005689    -1.49   0.136    -.0019626    .0002676
       _cons |  -.0648006   .1212144    -0.53   0.593    -.3023764    .1727752
------------------------------------------------------------------------------

.                         
.                         * Lag DV with ar(1) & cluster-rob errors with GLM log
> it link | add region & year effects *
.                         xtgee hhi_2digit_p_e l.hhi_2digit_p_e i.year $region 
> $region gwf_pers  $x ///
>                         if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==
> 732)) & allregime~=. & year>=1980, ///
>                         cor(ar1) link(logit) fam(bin) vce(rob) force
note: americas omitted because of collinearity
note: asia omitted because of collinearity
note: easia omitted because of collinearity
note: meast omitted because of collinearity
note: ssa omitted because of collinearity
note: time omitted because of collinearity
note:  some groups have fewer than 2 observations
       not possible to estimate correlations for those groups
       4 groups omitted from estimation


Iteration 1: tolerance = .0081728
Iteration 2: tolerance = .00100267
Iteration 3: tolerance = .00011397
Iteration 4: tolerance = .00001292
Iteration 5: tolerance = 1.464e-06
Iteration 6: tolerance = 1.659e-07

GEE population-averaged model                   Number of obs     =      1,930
Group and time vars:          cowcode year      Number of groups  =         99
Link:                                logit      Obs per group:
Family:                           binomial                    min =          2
Correlation:                         AR(1)                    avg =       19.5
                                                              max =         31
                                                Wald chi2(41)     =    6159.85
Scale parameter:                         1      Prob > chi2       =     0.0000

                                (Std. Err. adjusted for clustering on cowcode)
------------------------------------------------------------------------------
             |               Robust
hhi_2di~p_ex |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
hhi_2di~p_ex |
         L1. |    4.52928   .0932675    48.56   0.000     4.346479    4.712081
             |
        year |
       1981  |  -.0362201   .0604703    -0.60   0.549    -.1547397    .0822995
       1982  |    .021903   .0598751     0.37   0.715    -.0954501     .139256
       1983  |  -.0106376   .0621575    -0.17   0.864     -.132464    .1111888
       1984  |   .0870228   .0994625     0.87   0.382    -.1079201    .2819656
       1985  |   .0225861   .0595869     0.38   0.705     -.094202    .1393741
       1986  |  -.0874602   .1171169    -0.75   0.455    -.3170051    .1420847
       1987  |  -.0842222   .0636042    -1.32   0.185    -.2088842    .0404398
       1988  |  -.0400723   .0727045    -0.55   0.582    -.1825705    .1024258
       1989  |  -.0212355   .0473702    -0.45   0.654    -.1140793    .0716083
       1990  |  -.0170867   .0577908    -0.30   0.767    -.1303546    .0961813
       1991  |  -.0164116   .0764084    -0.21   0.830    -.1661694    .1333462
       1992  |  -.0487522   .0614863    -0.79   0.428    -.1692631    .0717587
       1993  |  -.0284758   .0625687    -0.46   0.649    -.1511081    .0941565
       1994  |  -.0985735    .082835    -1.19   0.234     -.260927    .0637801
       1995  |  -.0887915   .0688589    -1.29   0.197    -.2237525    .0461695
       1996  |  -.0646787    .048252    -1.34   0.180    -.1592509    .0298934
       1997  |  -.0648922   .0658149    -0.99   0.324    -.1938869    .0641026
       1998  |  -.0315642   .0661595    -0.48   0.633    -.1612345     .098106
       1999  |  -.0038286    .058354    -0.07   0.948    -.1182003    .1105431
       2000  |   .0563467   .0684723     0.82   0.411    -.0778566      .19055
       2001  |  -.1102603   .0674736    -1.63   0.102    -.2425062    .0219855
       2002  |  -.0950389   .0572264    -1.66   0.097    -.2072006    .0171228
       2003  |   .0040108    .066351     0.06   0.952    -.1260347    .1340564
       2004  |  -.0595302   .0579035    -1.03   0.304    -.1730191    .0539586
       2005  |  -.0322119   .0539372    -0.60   0.550    -.1379269    .0735031
       2006  |  -.0252938   .0673936    -0.38   0.707    -.1573829    .1067954
       2007  |   -.146234    .057805    -2.53   0.011    -.2595297   -.0329382
       2008  |   -.017181   .0656062    -0.26   0.793    -.1457668    .1114048
       2009  |  -.1577677   .0690104    -2.29   0.022    -.2930257   -.0225098
       2010  |  -.0319102   .0591793    -0.54   0.590    -.1478995     .084079
             |
    americas |   .0686037   .0366624     1.87   0.061    -.0032533    .1404608
        asia |    .081224   .0461825     1.76   0.079    -.0092921    .1717401
       easia |  -.0192784   .0572684    -0.34   0.736    -.1315225    .0929657
       meast |   .0975935   .0454348     2.15   0.032     .0085429    .1866442
         ssa |   .0870236   .0365207     2.38   0.017     .0154444    .1586029
    americas |          0  (omitted)
        asia |          0  (omitted)
       easia |          0  (omitted)
       meast |          0  (omitted)
         ssa |          0  (omitted)
gwf_personal |   .0714042    .025256     2.83   0.005     .0219034    .1209049
     lgdpcap |  -.0154248    .015096    -1.02   0.307    -.0450125    .0141629
        lpop |  -.0203366   .0149669    -1.36   0.174    -.0496711     .008998
   lopenness |   .0769559    .029131     2.64   0.008     .0198602    .1340516
       oilpc |   .0170883   .0047582     3.59   0.000     .0077623    .0264143
        time |          0  (omitted)
       _cons |  -2.226625   .3613672    -6.16   0.000    -2.934892   -1.518359
------------------------------------------------------------------------------

.                         
.                         * Lag DV with RE and cluster-robust errors * 
.                         xtreg p_exp l.p_exp gwf_pers $region $x if (oecd2==0 
> | (cow==70 | cow==155 | cow==640 | cow==732)) ///
>                         & allregime~=. & year>=1980,re vce(cluster cow)

Random-effects GLS regression                   Number of obs     =      1,934
Group variable: cowcode                         Number of groups  =        103

R-sq:                                           Obs per group:
     within  = 0.5645                                         min =          1
     between = 0.9964                                         avg =       18.8
     overall = 0.9239                                         max =         31

                                                Wald chi2(12)     =   24723.81
corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000

                              (Std. Err. adjusted for 103 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
       p_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       p_exp |
         L1. |   .9219706   .0102875    89.62   0.000     .9018076    .9421336
             |
gwf_personal |   .0605655   .0235143     2.58   0.010     .0144782    .1066527
    americas |   .0138201   .0286133     0.48   0.629    -.0422609    .0699011
        asia |   .0430986   .0314452     1.37   0.171    -.0185328      .10473
       easia |  -.0234383   .0395203    -0.59   0.553    -.1008967    .0540202
       meast |   .0661834   .0365024     1.81   0.070    -.0053599    .1377267
         ssa |   .0692123   .0287313     2.41   0.016     .0128999    .1255246
     lgdpcap |  -.0031459   .0107655    -0.29   0.770    -.0242458     .017954
        lpop |  -.0139131   .0080034    -1.74   0.082    -.0295996    .0017733
   lopenness |   .0353818   .0205271     1.72   0.085    -.0048506    .0756142
       oilpc |   .0158366   .0039656     3.99   0.000     .0080641    .0236091
        time |  -.0014507   .0008904    -1.63   0.103    -.0031958    .0002944
       _cons |  -.0168001   .2197705    -0.08   0.939    -.4475423    .4139421
-------------+----------------------------------------------------------------
     sigma_u |          0
     sigma_e |  .32661843
         rho |          0   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         
.                         
.                 ***************************
.                 ***** Secondary sector ****
.                 ***************************             
.                 * Different specifications *
.                         * No controls *
.                         xtregar s_exp gwf_pers if (oecd2==0 | (cow==70 | cow=
> =155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,189
Group variable: cowcode                         Number of groups  =        114

R-sq:                                           Obs per group:
     within  = 0.0001                                         min =          1
     between = 0.0283                                         avg =       19.2
     overall = 0.0235                                         max =         31

                                                Wald chi2(2)      =       2.01
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.3662

------------------- theta --------------------
  min      5%       median        95%      max
0.4128   0.6039     0.7223     0.7260   0.7260

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .1144846   .0807699     1.42   0.156    -.0438214    .2727907
       _cons |  -1.161468   .0846582   -13.72   0.000    -1.327395   -.9955412
-------------+----------------------------------------------------------------
      rho_ar |  .69096828   (estimated autocorrelation coefficient)
     sigma_u |  .82498621
     sigma_e |  .43258358
     rho_fov |  .78434723   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         
.                         * other regime types *
.                         xtregar s_exp gwf_pers gwf_party gwf_mil gwf_mon $reg
> ion $x if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,065
Group variable: cowcode                         Number of groups  =        106

R-sq:                                           Obs per group:
     within  = 0.0342                                         min =          1
     between = 0.3728                                         avg =       19.5
     overall = 0.2909                                         max =         31

                                                Wald chi2(15)     =      97.37
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.3203   0.5284     0.6639     0.6696   0.6696

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0218501   .0799757    -0.27   0.785    -.1785995    .1348994
   gwf_party |   .0521849   .0900799     0.58   0.562    -.1243685    .2287383
gwf_military |  -.0543932   .0730652    -0.74   0.457    -.1975985     .088812
gwf_monarchy |  -.2409275   .2233926    -1.08   0.281     -.678769    .1969139
    americas |  -.0787305   .2421992    -0.33   0.745    -.5534322    .3959713
        asia |   1.183071   .2827719     4.18   0.000     .6288485    1.737294
       easia |   .7499484   .3260043     2.30   0.021     .1109916    1.388905
       meast |   .6382809   .2708899     2.36   0.018     .1073465    1.169215
         ssa |   .6745903   .2323744     2.90   0.004     .2191448    1.130036
     lgdpcap |   -.214634   .0659759    -3.25   0.001    -.3439443   -.0853237
        lpop |  -.2830657   .0561896    -5.04   0.000    -.3931953   -.1729361
   lopenness |  -.0600517   .0721901    -0.83   0.405    -.2015417    .0814383
       oilpc |   .0675241   .0203063     3.33   0.001     .0277245    .1073238
        time |   -.002211   .0034242    -0.65   0.518    -.0089223    .0045003
       _cons |   4.602065   1.199529     3.84   0.000     2.251031    6.953098
-------------+----------------------------------------------------------------
      rho_ar |  .66631271   (estimated autocorrelation coefficient)
     sigma_u |  .59868977
     sigma_e |  .41366074
     rho_fov |  .67686349   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         
.                         * drop region effects *
.                         xi:xtregar s_exp   gwf_pers $x if (oecd2==0 | (cow==7
> 0 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,065
Group variable: cowcode                         Number of groups  =        106

R-sq:                                           Obs per group:
     within  = 0.0353                                         min =          1
     between = 0.2119                                         avg =       19.5
     overall = 0.1392                                         max =         31

                                                Wald chi2(7)      =      53.28
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.3809   0.5850     0.7087     0.7137   0.7137

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0141313   .0781973    -0.18   0.857    -.1673952    .1391326
     lgdpcap |  -.3294172   .0618424    -5.33   0.000     -.450626   -.2082084
        lpop |  -.2291629   .0558735    -4.10   0.000     -.338673   -.1196528
   lopenness |   .0040408   .0707652     0.06   0.954    -.1346565     .142738
       oilpc |   .0694013   .0207725     3.34   0.001     .0286879    .1101147
        time |  -.0022636   .0032211    -0.70   0.482    -.0085769    .0040497
       _cons |   4.790363   1.140989     4.20   0.000     2.554066     7.02666
-------------+----------------------------------------------------------------
      rho_ar |  .66847888   (estimated autocorrelation coefficient)
     sigma_u |  .70435171
     sigma_e |  .41295518
     rho_fov |  .74419307   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         
.                         * add other sector *
.                         xtregar s_exp p_exp gwf_pers $region $x if (oecd2==0 
> | (cow==70 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,re

RE GLS regression with AR(1) disturbances       Number of obs     =      2,065
Group variable: cowcode                         Number of groups  =        106

R-sq:                                           Obs per group:
     within  = 0.0313                                         min =          1
     between = 0.4181                                         avg =       19.5
     overall = 0.3171                                         max =         31

                                                Wald chi2(13)     =     118.03
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2973   0.5023     0.6420     0.6477   0.6477

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       p_exp |   .1048376   .0255452     4.10   0.000     .0547699    .1549053
gwf_personal |  -.0370607    .076904    -0.48   0.630    -.1877898    .1136684
    americas |  -.1135603   .2316169    -0.49   0.624    -.5675212    .3404005
        asia |   1.102775   .2690877     4.10   0.000     .5753725    1.630177
       easia |   .7608229    .308385     2.47   0.014     .1563995    1.365246
       meast |   .3889015   .2473789     1.57   0.116    -.0959522    .8737553
         ssa |   .5428957   .2215073     2.45   0.014     .1087494    .9770421
     lgdpcap |  -.2173976   .0633458    -3.43   0.001     -.341553   -.0932421
        lpop |  -.2609037   .0536476    -4.86   0.000    -.3660511   -.1557563
   lopenness |  -.0779597   .0718662    -1.08   0.278    -.2188148    .0628954
       oilpc |   .0476614   .0204928     2.33   0.020     .0074962    .0878265
        time |  -.0008483     .00327    -0.26   0.795    -.0072574    .0055607
       _cons |   4.507696   1.158626     3.89   0.000      2.23683    6.778563
-------------+----------------------------------------------------------------
      rho_ar |  .67205669   (estimated autocorrelation coefficient)
     sigma_u |  .56600349
     sigma_e |  .41391248
     rho_fov |  .65155726   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. 
.                         
.                 * Estimate errors in different ways *
.                         * GLS with het & psar1 errors *
.                         xtgls s_exp gwf_pers $region $x if (oecd2==0 | (cow==
> 70 | cow==155 | cow==640 | cow==732)) & ///
>                         allregime~=. & year>=1980,cor(psar1) panel(het) force
(note: 3 observations dropped because only 1 obs in group)

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        heteroskedastic
Correlation:   panel-specific AR(1)

Estimated covariances      =       103          Number of obs     =      2,062
Estimated autocorrelations =       103          Number of groups  =        103
Estimated coefficients     =        12          Obs per group:
                                                              min =          2
                                                              avg =   20.01942
                                                              max =         31
                                                Wald chi2(11)     =    2853.99
                                                Prob > chi2       =     0.0000

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0556154   .0451522     1.23   0.218    -.0328813    .1441122
    americas |  -.0687438   .0675355    -1.02   0.309    -.2011109    .0636233
        asia |    1.30045   .0852417    15.26   0.000      1.13338    1.467521
       easia |   1.006789   .1534021     6.56   0.000      .706126    1.307451
       meast |   .8363624    .087014     9.61   0.000     .6658181    1.006907
         ssa |   .6121474   .0706583     8.66   0.000     .4736597    .7506351
     lgdpcap |  -.1734403   .0225667    -7.69   0.000    -.2176702   -.1292104
        lpop |  -.3014145   .0213906   -14.09   0.000    -.3433394   -.2594896
   lopenness |  -.1275478   .0319092    -4.00   0.000    -.1900887    -.065007
       oilpc |   .0378406   .0082324     4.60   0.000     .0217053    .0539758
        time |    .002891   .0019238     1.50   0.133    -.0008796    .0066616
       _cons |   4.738454   .4047502    11.71   0.000     3.945158     5.53175
------------------------------------------------------------------------------

.                         
.                         * ar(1) with FE and logit-transformed DV *
.                         xtregar s_exp gwf_pers $region $x if (oecd2==0 | (cow
> ==70 | cow==155 | cow==640 | cow==732)) &  ///
>                         allregime~=. & year>=1980,fe
note: americas dropped because of collinearity
note: asia dropped because of collinearity
note: easia dropped because of collinearity
note: meast dropped because of collinearity
note: ssa dropped because of collinearity

FE (within) regression with AR(1) disturbances  Number of obs     =      1,959
Group variable: cowcode                         Number of groups  =        103

R-sq:                                           Obs per group:
     within  = 0.0204                                         min =          1
     between = 0.0322                                         avg =       19.0
     overall = 0.0306                                         max =         30

                                                F(6,1850)         =       6.43
corr(u_i, Xb)  = -0.2117                        Prob > F          =     0.0000

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0733386   .0887695    -0.83   0.409    -.2474376    .1007604
    americas |          0  (omitted)
        asia |          0  (omitted)
       easia |          0  (omitted)
       meast |          0  (omitted)
         ssa |          0  (omitted)
     lgdpcap |  -.2667839   .1074698    -2.48   0.013    -.4775587   -.0560091
        lpop |   .0588703   .0474846     1.24   0.215    -.0342588    .1519994
   lopenness |   .0024263   .0799195     0.03   0.976    -.1543155    .1591681
       oilpc |    .054718   .0272442     2.01   0.045     .0012854    .1081505
        time |  -.0097708    .003929    -2.49   0.013    -.0174766    -.002065
       _cons |   -.310564   .0719486    -4.32   0.000    -.4516729   -.1694551
-------------+----------------------------------------------------------------
      rho_ar |  .66847888
     sigma_u |  .86761815
     sigma_e |   .4059788
     rho_fov |  .82037667   (fraction of variance because of u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(102,1850) = 6.25                    Prob > F = 0.0000

.                         
.                         * newey *
.                         forval i = 1/3 {
  2.                                 qui:newey s_exp gwf_pers $region $x if (oe
> cd2==0 | (cow==70 | cow==155 | cow==640 | cow==732)) &  ///
>                                 allregime~=. & year>=1980,lag(`i') force
  3.                                 lincom gwf_pers
  4.                         }

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0324714   .0769754    -0.42   0.673    -.1834293    .1184866
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0324714   .0874228    -0.37   0.710     -.203918    .1389753
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0324714   .0957419    -0.34   0.735    -.2202328      .15529
------------------------------------------------------------------------------

.                         
.                 * Drop influential countries, one at a time *
.                         local country = "Venezuela Libya Iraq Nigeria Azerbai
> jan Yemen Guinea Burundi"

.                         foreach c of local country {
  2.                                 qui:xtregar s_exp gwf_pers $region $x if (
> oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==732)) ///
>                                 & allregime~=. & year>=1980 & gwf_country~="`
> c'",re
  3.                                 lincom gwf_pers
  4.                         }

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0472445   .0794805    -0.59   0.552    -.2030234    .1085345
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0249425   .0776475    -0.32   0.748    -.1771288    .1272438
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0330891   .0775668    -0.43   0.670    -.1851173     .118939
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0246469   .0767862    -0.32   0.748    -.1751451    .1258513
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0217173    .077737    -0.28   0.780    -.1740791    .1306444
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   -.028482   .0757474    -0.38   0.707    -.1769442    .1199802
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0353855   .0760176    -0.47   0.642    -.1843772    .1136061
------------------------------------------------------------------------------

 ( 1)  gwf_personal = 0

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0252299   .0775328    -0.33   0.745    -.1771914    .1267317
------------------------------------------------------------------------------

. 
. 
.                 *** Lag DV models ***   
.                         * Lag DV with cluster SE with GLM logit link *
.                         glm hhi_2digit_s_e l.hhi_2digit_p_e gwf_pers $region 
> $x ///
>                         if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==
> 732)) & allregime~=. & year>=1980, ///
>                         fam(bin) link(logit) vce(cluster cow)
note: hhi_2digit_s_ex has noninteger values

Iteration 0:   log pseudolikelihood =   -718.719  
Iteration 1:   log pseudolikelihood = -715.21273  
Iteration 2:   log pseudolikelihood = -715.20687  
Iteration 3:   log pseudolikelihood = -715.20687  

Generalized linear models                         No. of obs      =      1,930
Optimization     : ML                             Residual df     =      1,917
                                                  Scale parameter =          1
Deviance         =  175.3764698                   (1/df) Deviance =   .0914849
Pearson          =  178.2422877                   (1/df) Pearson  =   .0929798

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   .7546185
Log pseudolikelihood =  -715.206873               BIC             =  -14327.26

                              (Std. Err. adjusted for 103 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
hhi_2di~s_ex |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
hhi_2di~p_ex |
         L1. |   1.062441    .255031     4.17   0.000     .5625896    1.562293
             |
gwf_personal |  -.1198884   .1399485    -0.86   0.392    -.3941824    .1544056
    americas |  -.2355355   .1702633    -1.38   0.167    -.5692453    .0981744
        asia |   1.105283   .2598602     4.25   0.000     .5959661      1.6146
       easia |   .8400834   .2834265     2.96   0.003     .2845776    1.395589
       meast |   .3260214   .2194647     1.49   0.137    -.1041215    .7561643
         ssa |   .2725367   .1985449     1.37   0.170    -.1166041    .6616775
     lgdpcap |  -.1861542   .0777353    -2.39   0.017    -.3385126   -.0337959
        lpop |  -.2642845   .0623821    -4.24   0.000    -.3865512   -.1420179
   lopenness |  -.2198685   .1527104    -1.44   0.150    -.5191753    .0794383
       oilpc |   .0042789   .0255714     0.17   0.867    -.0458402    .0543979
        time |   .0075714   .0056415     1.34   0.180    -.0034856    .0186285
       _cons |   4.598031   1.475975     3.12   0.002     1.705174    7.490888
------------------------------------------------------------------------------

.                         
.                         * Lag DV with logit-transformed DV & ar(1) & het erro
> rs *
.                         xtgls s_exp l.s_exp gwf_pers $region $x ///
>                         if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==
> 732)) & allregime~=. & year>=1980, ///
>                         panel(het) cor(ar1) force
(note: 4 observations dropped because only 1 obs in group)

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        heteroskedastic
Correlation:   common AR(1) coefficient for all panels  (0.0947)

Estimated covariances      =        99          Number of obs     =      1,921
Estimated autocorrelations =         1          Number of groups  =         99
Estimated coefficients     =        13          Obs per group:
                                                              min =          2
                                                              avg =   19.40404
                                                              max =         31
                                                Wald chi2(12)     =   16463.85
                                                Prob > chi2       =     0.0000

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       s_exp |
         L1. |   .9089365    .009673    93.97   0.000     .8899779    .9278952
             |
gwf_personal |   .0060445   .0205238     0.29   0.768    -.0341814    .0462704
    americas |   -.012603   .0173976    -0.72   0.469    -.0467017    .0214958
        asia |   .0953318   .0265683     3.59   0.000     .0432587    .1474048
       easia |   .0480939   .0237601     2.02   0.043      .001525    .0946629
       meast |   .0220594   .0193221     1.14   0.254    -.0158112    .0599299
         ssa |   .0375015   .0232279     1.61   0.106    -.0080244    .0830275
     lgdpcap |  -.0085618   .0066658    -1.28   0.199    -.0216265    .0045028
        lpop |  -.0217644   .0067264    -3.24   0.001     -.034948   -.0085809
   lopenness |   .0019677   .0158694     0.12   0.901    -.0291359    .0330712
       oilpc |   .0045572   .0025136     1.81   0.070    -.0003693    .0094837
        time |  -.0016432    .000657    -2.50   0.012     -.002931   -.0003554
       _cons |   .2661117    .158259     1.68   0.093    -.0440703    .5762937
------------------------------------------------------------------------------

. 
.                         * Lag DV with logit-transformed DV & psar(1) & het er
> rors *
.                         xtgls s_exp l.s_exp gwf_pers  $region $x ///
>                         if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==
> 732)) & allregime~=. & year>=1980, ///
>                         panel(het) cor(psar1) force
(note: 4 observations dropped because only 1 obs in group)

Cross-sectional time-series FGLS regression

Coefficients:  generalized least squares
Panels:        heteroskedastic
Correlation:   panel-specific AR(1)

Estimated covariances      =        99          Number of obs     =      1,921
Estimated autocorrelations =        99          Number of groups  =         99
Estimated coefficients     =        13          Obs per group:
                                                              min =          2
                                                              avg =   19.40404
                                                              max =         31
                                                Wald chi2(12)     =   21684.36
                                                Prob > chi2       =     0.0000

------------------------------------------------------------------------------
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       s_exp |
         L1. |   .8691851   .0101407    85.71   0.000     .8493097    .8890604
             |
gwf_personal |  -.0239225   .0188069    -1.27   0.203    -.0607833    .0129383
    americas |  -.0497666   .0191584    -2.60   0.009    -.0873163   -.0122169
        asia |   .1727181   .0263251     6.56   0.000     .1211219    .2243143
       easia |   .0810883   .0279452     2.90   0.004     .0263168    .1358599
       meast |   .0308227    .023011     1.34   0.180    -.0142781    .0759235
         ssa |   .0295233   .0219369     1.35   0.178    -.0134722    .0725188
     lgdpcap |  -.0160623   .0071229    -2.26   0.024     -.030023   -.0021017
        lpop |  -.0396395   .0064216    -6.17   0.000    -.0522255   -.0270535
   lopenness |  -.0144785   .0154447    -0.94   0.349    -.0447495    .0157924
       oilpc |   .0064689    .002367     2.73   0.006     .0018296    .0111082
        time |  -.0009796   .0006971    -1.41   0.160    -.0023459    .0003867
       _cons |   .6180452   .1515499     4.08   0.000     .3210129    .9150774
------------------------------------------------------------------------------

.                         
.                         * Lag DV with ar(1) & cluster-rob errors with GLM log
> it link | add region & year effects *
.                         xtgee hhi_2digit_s_e l.hhi_2digit_s_e i.year  gwf_per
> s  $x ///
>                         if (oecd2==0 | (cow==70 | cow==155 | cow==640 | cow==
> 732)) & allregime~=. & year>=1980, ///
>                         cor(ar1) link(logit) fam(bin) vce(rob) force
note: time omitted because of collinearity
note:  some groups have fewer than 2 observations
       not possible to estimate correlations for those groups
       4 groups omitted from estimation


Iteration 1: tolerance = .07358618
Iteration 2: tolerance = .0128183
Iteration 3: tolerance = .00184908
Iteration 4: tolerance = .00025052
Iteration 5: tolerance = .00003355
Iteration 6: tolerance = 4.486e-06
Iteration 7: tolerance = 5.997e-07

GEE population-averaged model                   Number of obs     =      1,924
Group and time vars:          cowcode year      Number of groups  =         99
Link:                                logit      Obs per group:
Family:                           binomial                    min =          2
Correlation:                         AR(1)                    avg =       19.4
                                                              max =         31
                                                Wald chi2(36)     =    7597.92
Scale parameter:                         1      Prob > chi2       =     0.0000

                                (Std. Err. adjusted for clustering on cowcode)
------------------------------------------------------------------------------
             |               Robust
hhi_2di~s_ex |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
hhi_2di~s_ex |
         L1. |   4.518437   .1154858    39.13   0.000     4.292089    4.744785
             |
        year |
       1981  |  -.0031815   .1140803    -0.03   0.978    -.2267749    .2204118
       1982  |  -.0816035   .1019127    -0.80   0.423    -.2813488    .1181418
       1983  |   .0540613   .0973996     0.56   0.579    -.1368385    .2449611
       1984  |  -.0626232   .1031374    -0.61   0.544    -.2647687    .1395223
       1985  |  -.0615177   .1145466    -0.54   0.591    -.2860248    .1629895
       1986  |  -.0333306   .0936815    -0.36   0.722     -.216943    .1502819
       1987  |  -.0275354    .088563    -0.31   0.756    -.2011157    .1460448
       1988  |  -.1217419   .0959004    -1.27   0.204    -.3097032    .0662195
       1989  |  -.1066901   .0839846    -1.27   0.204     -.271297    .0579168
       1990  |  -.1184254   .0776503    -1.53   0.127    -.2706173    .0337664
       1991  |  -.0083963   .0896323    -0.09   0.925    -.1840723    .1672798
       1992  |   .0079331    .090847     0.09   0.930    -.1701238    .1859901
       1993  |  -.0265318   .0914342    -0.29   0.772    -.2057396     .152676
       1994  |  -.0564169   .0786726    -0.72   0.473    -.2106124    .0977785
       1995  |  -.0949141   .1394634    -0.68   0.496    -.3682574    .1784291
       1996  |  -.0244278   .1121051    -0.22   0.828    -.2441497     .195294
       1997  |   -.026412   .1131883    -0.23   0.815    -.2482569    .1954329
       1998  |  -.1053504   .1046895    -1.01   0.314    -.3105382    .0998373
       1999  |  -.0075561   .0922725    -0.08   0.935    -.1884068    .1732946
       2000  |   .0138723   .0953548     0.15   0.884    -.1730197    .2007643
       2001  |   -.033862   .1036218    -0.33   0.744     -.236957     .169233
       2002  |   -.049707   .1012136    -0.49   0.623     -.248082    .1486681
       2003  |  -.0848324   .0988647    -0.86   0.391    -.2786036    .1089388
       2004  |  -.1412236   .0966686    -1.46   0.144    -.3306907    .0482435
       2005  |  -.1171142   .1018509    -1.15   0.250    -.3167382    .0825099
       2006  |  -.0615967   .0890334    -0.69   0.489     -.236099    .1129055
       2007  |  -.1610892   .0910348    -1.77   0.077    -.3395141    .0173358
       2008  |  -.1386506   .1223901    -1.13   0.257    -.3785309    .1012297
       2009  |  -.0807477   .1034841    -0.78   0.435    -.2835729    .1220775
       2010  |  -.0794768   .0909665    -0.87   0.382    -.2577678    .0988143
             |
gwf_personal |  -.0068876   .0366312    -0.19   0.851    -.0786835    .0649083
     lgdpcap |  -.0587711   .0159957    -3.67   0.000    -.0901222   -.0274201
        lpop |  -.0232379   .0123789    -1.88   0.060    -.0475002    .0010244
   lopenness |    .062355   .0334369     1.86   0.062    -.0031801    .1278901
       oilpc |   .0152429    .005939     2.57   0.010     .0036028    .0268831
        time |          0  (omitted)
       _cons |  -1.788913     .36733    -4.87   0.000    -2.508867   -1.068959
------------------------------------------------------------------------------

.                         
.                         * Lag DV with RE and cluster-robust errors * 
.                         xtreg s_exp l.s_exp gwf_pers $region $x if (oecd2==0 
> | (cow==70 | cow==155 | cow==640 | cow==732)) ///
>                         & allregime~=. & year>=1980,re vce(cluster cow) 

Random-effects GLS regression                   Number of obs     =      1,925
Group variable: cowcode                         Number of groups  =        103

R-sq:                                           Obs per group:
     within  = 0.3612                                         min =          1
     between = 0.9768                                         avg =       18.7
     overall = 0.7937                                         max =         31

                                                Wald chi2(12)     =    3079.56
corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000

                              (Std. Err. adjusted for 103 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
       s_exp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       s_exp |
         L1. |   .8003866   .0327208    24.46   0.000      .736255    .8645181
             |
gwf_personal |  -.0406716    .035001    -1.16   0.245    -.1092722    .0279291
    americas |  -.0559337   .0373965    -1.50   0.135    -.1292295    .0173622
        asia |   .2127308   .0641254     3.32   0.001     .0870473    .3384144
       easia |    .134831    .068766     1.96   0.050      .000052    .2696099
       meast |   .0686361   .0576037     1.19   0.233     -.044265    .1815372
         ssa |   .0719555   .0431302     1.67   0.095    -.0125782    .1564892
     lgdpcap |  -.0415351   .0170775    -2.43   0.015    -.0750064   -.0080638
        lpop |  -.0632153   .0157491    -4.01   0.000     -.094083   -.0323476
   lopenness |  -.0290286   .0356694    -0.81   0.416    -.0989393    .0408821
       oilpc |   .0136869   .0050506     2.71   0.007      .003788    .0235859
        time |  -.0007495   .0013395    -0.56   0.576    -.0033749    .0018759
       _cons |   1.124264   .3711196     3.03   0.002     .3968828    1.851645
-------------+----------------------------------------------------------------
     sigma_u |  .06241546
     sigma_e |  .39056968
         rho |  .02490207   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. 
.  
.                 *************************************   
.                 *** Table M-1: US Fixed Asset FDI ***
.                 *************************************
.                         cd "$dir"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files

.                         use temp.dta, clear

.                         joinby cowcode year using "$dir\us-fixed-asset-fdi\fi
> xedcapexp2000.dta" ,unmatched(both)

.                         tab _merge

                       _merge |      Freq.     Percent        Cum.
------------------------------+-----------------------------------
          only in master data |        407        7.08        7.08
           only in using data |      2,217       38.57       45.65
both in master and using data |      3,124       54.35      100.00
------------------------------+-----------------------------------
                        Total |      5,748      100.00

.                         drop if _merge==2
(2,217 observations deleted)

.                         drop _merge

. 
.                         gen capexpgdp=capex2000*1000000/cgdp
(2,515 missing values generated)

.                         gen cub_capexgdp=(capexpgdp)^(1/3)
(2,515 missing values generated)

. 
.                         global cvarlist="allexp gtime lgdpcap lpop lopenness 
> grow incidencev413 meanres ldevelopingfdi asia america easia ssa"

.                         lab var gwf_personal "Personalist"

.                         lab var allexp "Expropriations"

.                         lab var gtime "Regime duration"

.                         lab var lgdpcap "GDP per cap. (log)"

.                         lab var lpop "Population (log)"

.                         lab var lopenness "Trade (log)"

.                         lab var grow "Annual GDP Growth"

.                         lab var incidencev413 "Civil Conflict"

.                         lab var meanres "Oil reserves per cap. (log)"

.                         lab var ldevelopingfdi "Total Developling FDI"

.                         lab var asia "Asia"

.                         lab var america "Americas"

.                         lab var easia "East Asia"

.                         lab var ssa "Sub-Saharan Africa"

.                          
.                         macro define output "label se dec(3) adec(3) addstat(
> R-squared,e(r2_o)) "

.                         xtset cowcode year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.                         eststo usfdi1: xtregar cub_capexgdp gwf_personal $cva
> rlist, re 

RE GLS regression with AR(1) disturbances       Number of obs     =        987
Group variable: cowcode                         Number of groups  =        108

R-sq:                                           Obs per group:
     within  = 0.0057                                         min =          1
     between = 0.2723                                         avg =        9.1
     overall = 0.3130                                         max =         12

                                                Wald chi2(15)     =      55.34
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.5294   0.6725     0.7071     0.7076   0.7076

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0076875   .0071954     1.07   0.285    -.0064153    .0217903
      allexp |   -.002278   .0023836    -0.96   0.339    -.0069498    .0023938
       gtime |  -.0008886   .0020164    -0.44   0.659    -.0048407    .0030636
     lgdpcap |   .0164733   .0065173     2.53   0.011     .0036997     .029247
        lpop |   .0157812   .0053146     2.97   0.003     .0053647    .0261977
   lopenness |   .0157151   .0070522     2.23   0.026      .001893    .0295372
        grow |  -.0001264    .000175    -0.72   0.470    -.0004695    .0002167
incidenc~413 |  -.0031012   .0035707    -0.87   0.385    -.0100996    .0038971
meanreserves |    .005831   .0031835     1.83   0.067    -.0004086    .0120706
ldevelopin~i |  -.0056109   .0035981    -1.56   0.119     -.012663    .0014412
        asia |   .0141483   .0250444     0.56   0.572    -.0349379    .0632344
    americas |   .0965232   .0198451     4.86   0.000     .0576274     .135419
       easia |   .0885504   .0295177     3.00   0.003     .0306968     .146404
         ssa |   .0661134   .0196987     3.36   0.001     .0275046    .1047221
       _cons |  -.3289249   .1062148    -3.10   0.002    -.5371021   -.1207476
-------------+----------------------------------------------------------------
      rho_ar |  .68669292   (estimated autocorrelation coefficient)
     sigma_u |  .06515213
     sigma_e |  .02525927
     rho_fov |  .86933179   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.                         eststo usfdi2: xtregar cub_capexgdp gwf_personal $cva
> rlist if cub_capexgdp<.47, re 

RE GLS regression with AR(1) disturbances       Number of obs     =        984
Group variable: cowcode                         Number of groups  =        108

R-sq:                                           Obs per group:
     within  = 0.0031                                         min =          1
     between = 0.3039                                         avg =        9.1
     overall = 0.3629                                         max =         12

                                                Wald chi2(15)     =      65.44
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.5183   0.6639     0.7038     0.7045   0.7045

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0170686   .0072286     2.36   0.018     .0029008    .0312364
      allexp |  -.0024671   .0023639    -1.04   0.297    -.0071003    .0021661
       gtime |  -.0000331   .0019953    -0.02   0.987    -.0039438    .0038776
     lgdpcap |   .0187941    .006221     3.02   0.003     .0066012    .0309871
        lpop |   .0162124   .0050424     3.22   0.001     .0063295    .0260953
   lopenness |   .0143287   .0070146     2.04   0.041     .0005804     .028077
        grow |   .0001062   .0001798     0.59   0.555    -.0002461    .0004586
incidenc~413 |   -.000941   .0035536    -0.26   0.791    -.0079059    .0060239
meanreserves |   .0053017   .0030113     1.76   0.078    -.0006004    .0112039
ldevelopin~i |  -.0075736   .0035259    -2.15   0.032    -.0144844   -.0006629
        asia |   .0161278   .0236547     0.68   0.495    -.0302347    .0624902
    americas |   .0980293   .0187394     5.23   0.000     .0613008    .1347577
       easia |   .0905554   .0278917     3.25   0.001     .0358887    .1452221
         ssa |   .0665701   .0186231     3.57   0.000     .0300695    .1030706
       _cons |  -.3287338    .101605    -3.24   0.001     -.527876   -.1295915
-------------+----------------------------------------------------------------
      rho_ar |  .67208851   (estimated autocorrelation coefficient)
     sigma_u |   .0611389
     sigma_e |  .02488566
     rho_fov |  .85787032   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. 
.                         outreg2 [usfdi1 usfdi2] using "Table_usfdi.xls", $out
> put replace
Table_usfdi.xls
dir : seeout

.                         drop if year<1997
(1,929 observations deleted)

.                         keep country year cowcode cub_capexgdp gwf_personal $
> cvarlist oilpc allfdi

.                         save  "$dir\us-fixed-asset-fdi\us-capex-imputation.dt
> a",replace
file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submiss
> ion\Replication Files\us-fixed-asset-fdi\us-capex-imputation.dta saved

.          
.                         ** retrieve regression results from the 10 imputed da
> ta sets
.                         clear

.                         cd "$dir\us-fixed-asset-fdi"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files\us-fixed-asset-fdi

.                         **** 
.                         ! dir us_capex*.csv /a-d /b > filelist1.txt

. 
.                         * command started with "file"* execute lines 2364-237
> 5 together
.                         file open myfile using "filelist1.txt", read

.                         file read myfile line

.                         local replace "replace" 

.                         while r(eof)==0 {
  2.                          import delimited `line',clear
  3.                          xtset cowcode year
  4.                          xtregar cub_capexgdp gwf_personal allexp gtime lg
> dpcap lpop lopenness grow incidencev413 meanreserves ldevelopingfdi asia amer
> icas easia ssa, re
  5.                          regsave gwf_personal allexp gtime lgdpcap lpop lo
> penness grow incidencev413 meanreserves ldevelopingfdi asia americas easia ss
> a _cons using us_capex_coefs.dta, ci level(95) `replace'
  6.                          local replace "append"
  7.                          file read myfile line
  8.                         }
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0991                                         min =          3
     between = 0.5798                                         avg =       13.6
     overall = 0.4030                                         max =         14

                                                Wald chi2(15)     =     329.13
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2625   0.5018     0.5148     0.5148   0.5148

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0252647   .0082568     3.06   0.002     .0090816    .0414478
      allexp |  -.0120378   .0050797    -2.37   0.018    -.0219938   -.0020819
       gtime |  -.0033139   .0028813    -1.15   0.250    -.0089612    .0023333
     lgdpcap |   .0131932   .0042755     3.09   0.002     .0048133     .021573
        lpop |   .0240176   .0033443     7.18   0.000     .0174628    .0305723
   lopenness |   .0537527   .0063111     8.52   0.000     .0413832    .0661222
        grow |   .0004228   .0002948     1.43   0.151     -.000155    .0010006
incidenc~413 |  -.0038808   .0060256    -0.64   0.520    -.0156907    .0079291
meanreserves |   .0087708   .0020178     4.35   0.000     .0048159    .0127256
ldevelopin~i |   .0195346   .0040558     4.82   0.000     .0115854    .0274837
        asia |  -.0089357   .0150572    -0.59   0.553    -.0384473    .0205758
    americas |   .1139025   .0131008     8.69   0.000     .0882255    .1395795
       easia |   .0728415   .0190424     3.83   0.000      .035519     .110164
         ssa |   .0536591   .0126579     4.24   0.000     .0288501    .0784681
       _cons |  -.9075324   .0781448   -11.61   0.000    -1.060693   -.7543715
-------------+----------------------------------------------------------------
      rho_ar |  .29302663   (estimated autocorrelation coefficient)
     sigma_u |  .03827378
     sigma_e |  .05782065
     rho_fov |  .30466906   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0785                                         min =          3
     between = 0.5486                                         avg =       13.6
     overall = 0.3612                                         max =         14

                                                Wald chi2(15)     =     278.09
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2555   0.4994     0.5126     0.5126   0.5126

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0312003   .0086607     3.60   0.000     .0142257    .0481749
      allexp |  -.0089015   .0054496    -1.63   0.102    -.0195826    .0017796
       gtime |  -.0007355   .0030348    -0.24   0.809    -.0066835    .0052126
     lgdpcap |   .0121727   .0045224     2.69   0.007      .003309    .0210364
        lpop |   .0232877   .0036085     6.45   0.000     .0162152    .0303602
   lopenness |   .0566872   .0064556     8.78   0.000     .0440345    .0693399
        grow |   .0007567   .0003232     2.34   0.019     .0001232    .0013901
incidenc~413 |  -.0046037   .0064501    -0.71   0.475    -.0172458    .0080383
meanreserves |   .0071357   .0020954     3.41   0.001     .0030288    .0112426
ldevelopin~i |   .0136299   .0042449     3.21   0.001     .0053101    .0219497
        asia |  -.0004416   .0157591    -0.03   0.978    -.0313289    .0304457
    americas |   .1141411   .0135377     8.43   0.000     .0876076    .1406746
       easia |   .0686083   .0196767     3.49   0.000     .0300426    .1071739
         ssa |   .0613301   .0131195     4.67   0.000     .0356163    .0870439
       _cons |  -.8350434   .0830179   -10.06   0.000    -.9977555   -.6723313
-------------+----------------------------------------------------------------
      rho_ar |  .25334427   (estimated autocorrelation coefficient)
     sigma_u |  .03944117
     sigma_e |  .06297784
     rho_fov |  .28172006   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0844                                         min =          3
     between = 0.6464                                         avg =       13.6
     overall = 0.4354                                         max =         14

                                                Wald chi2(15)     =     370.66
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2362   0.4770     0.4903     0.4903   0.4903

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0140768   .0081276     1.73   0.083     -.001853    .0300066
      allexp |  -.0043947   .0052187    -0.84   0.400    -.0146231    .0058337
       gtime |  -.0043515   .0028682    -1.52   0.129     -.009973      .00127
     lgdpcap |   .0064743   .0040904     1.58   0.113    -.0015427    .0144914
        lpop |   .0238621   .0033339     7.16   0.000     .0173279    .0303964
   lopenness |   .0795959   .0064453    12.35   0.000     .0669633    .0922285
        grow |    .001957   .0003077     6.36   0.000     .0013538    .0025601
incidenc~413 |   .0160206   .0061739     2.59   0.009       .00392    .0281212
meanreserves |     .00905   .0019379     4.67   0.000     .0052517    .0128482
ldevelopin~i |  -.0200799   .0040748    -4.93   0.000    -.0280663   -.0120935
        asia |  -.0226605   .0144329    -1.57   0.116    -.0509485    .0056276
    americas |   .1187703   .0124631     9.53   0.000     .0943431    .1431976
       easia |   .0470497   .0181722     2.59   0.010     .0114328    .0826665
         ssa |   .0585052    .012045     4.86   0.000     .0348975    .0821129
       _cons |   -.486331   .0784158    -6.20   0.000     -.640023   -.3326389
-------------+----------------------------------------------------------------
      rho_ar |  .25304767   (estimated autocorrelation coefficient)
     sigma_u |  .03559146
     sigma_e |  .06033589
     rho_fov |  .25814305   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0486                                         min =          3
     between = 0.5752                                         avg =       13.6
     overall = 0.3584                                         max =         14

                                                Wald chi2(15)     =     252.47
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2470   0.4888     0.5021     0.5021   0.5021

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |    .026792   .0083956     3.19   0.001     .0103368    .0432471
      allexp |  -.0071784   .0053152    -1.35   0.177     -.017596    .0032393
       gtime |  -.0016803   .0029487    -0.57   0.569    -.0074597     .004099
     lgdpcap |   .0135134   .0043116     3.13   0.002     .0050628    .0219639
        lpop |   .0235621   .0034398     6.85   0.000     .0168202    .0303041
   lopenness |   .0587826   .0067195     8.75   0.000     .0456125    .0719527
        grow |   .0006312   .0003143     2.01   0.045     .0000153    .0012472
incidenc~413 |   .0115605   .0062951     1.84   0.066    -.0007777    .0238988
meanreserves |   .0058633   .0020058     2.92   0.003      .001932    .0097946
ldevelopin~i |   .0027634   .0041761     0.66   0.508    -.0054216    .0109484
        asia |   .0002693    .015229     0.02   0.986    -.0295789    .0301176
    americas |   .1134864   .0130438     8.70   0.000      .087921    .1390517
       easia |   .0593404   .0189892     3.12   0.002     .0221223    .0965585
         ssa |   .0613935   .0126057     4.87   0.000     .0366867    .0861003
       _cons |  -.7219856   .0801681    -9.01   0.000    -.8791121    -.564859
-------------+----------------------------------------------------------------
      rho_ar |  .25972661   (estimated autocorrelation coefficient)
     sigma_u |  .03763925
     sigma_e |  .06134157
     rho_fov |  .27352308   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0697                                         min =          3
     between = 0.6000                                         avg =       13.6
     overall = 0.4068                                         max =         14

                                                Wald chi2(15)     =     305.93
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2785   0.5308     0.5438     0.5438   0.5438

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0204069   .0082405     2.48   0.013     .0042558     .036558
      allexp |  -.0039939    .005167    -0.77   0.440    -.0141211    .0061333
       gtime |  -.0042513   .0028728    -1.48   0.139    -.0098818    .0013793
     lgdpcap |   .0090231   .0041941     2.15   0.031     .0008029    .0172433
        lpop |   .0244756   .0034675     7.06   0.000     .0176795    .0312717
   lopenness |   .0680394   .0063323    10.74   0.000     .0556284    .0804504
        grow |   .0016325   .0003109     5.25   0.000     .0010232    .0022418
incidenc~413 |   .0103119   .0062023     1.66   0.096    -.0018444    .0224682
meanreserves |   .0085646   .0020267     4.23   0.000     .0045924    .0125369
ldevelopin~i |  -.0098409   .0039308    -2.50   0.012    -.0175452   -.0021365
        asia |   -.018023   .0151859    -1.19   0.235    -.0477869    .0117408
    americas |   .1169664    .013122     8.91   0.000     .0912478     .142685
       easia |   .0517048   .0190744     2.71   0.007     .0143196      .08909
         ssa |   .0561512    .012625     4.45   0.000     .0314066    .0808958
       _cons |  -.5858575   .0787853    -7.44   0.000    -.7402738   -.4314411
-------------+----------------------------------------------------------------
      rho_ar |   .2043259   (estimated autocorrelation coefficient)
     sigma_u |  .03896416
     sigma_e |  .06055619
     rho_fov |  .29279276   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0378                                         min =          3
     between = 0.5910                                         avg =       13.6
     overall = 0.3821                                         max =         14

                                                Wald chi2(15)     =     252.58
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2803   0.5330     0.5459     0.5459   0.5459

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0268364   .0081212     3.30   0.001     .0109192    .0427536
      allexp |  -.0083727   .0050825    -1.65   0.099    -.0183342    .0015889
       gtime |  -.0020219    .002835    -0.71   0.476    -.0075783    .0035345
     lgdpcap |   .0130055    .004214     3.09   0.002     .0047462    .0212647
        lpop |   .0216657   .0034344     6.31   0.000     .0149344    .0283969
   lopenness |   .0515495   .0061957     8.32   0.000     .0394063    .0636928
        grow |    .000907   .0003065     2.96   0.003     .0003063    .0015078
incidenc~413 |   .0105298   .0060834     1.73   0.083    -.0013933     .022453
meanreserves |   .0064922   .0020145     3.22   0.001     .0025439    .0104406
ldevelopin~i |   .0005817   .0038526     0.15   0.880    -.0069693    .0081326
        asia |  -.0165978    .015027    -1.10   0.269    -.0460501    .0128545
    americas |   .1059299   .0129496     8.18   0.000     .0805492    .1313107
       easia |   .0662173   .0188209     3.52   0.000     .0293292    .1031055
         ssa |   .0497658   .0125034     3.98   0.000     .0252597     .074272
       _cons |  -.6253418   .0779474    -8.02   0.000    -.7781158   -.4725677
-------------+----------------------------------------------------------------
      rho_ar |  .20224453   (estimated autocorrelation coefficient)
     sigma_u |  .03855924
     sigma_e |  .05971299
     rho_fov |  .29427564   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0836                                         min =          3
     between = 0.5687                                         avg =       13.6
     overall = 0.3664                                         max =         14

                                                Wald chi2(15)     =     303.82
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2448   0.4851     0.4983     0.4983   0.4983

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0168762   .0084408     2.00   0.046     .0003326    .0334198
      allexp |  -.0077068   .0053354    -1.44   0.149     -.018164    .0027505
       gtime |  -.0012528   .0029703    -0.42   0.673    -.0070745     .004569
     lgdpcap |   .0115731   .0043506     2.66   0.008     .0030461    .0201001
        lpop |   .0246193   .0034944     7.05   0.000     .0177705    .0314682
   lopenness |    .063916   .0064653     9.89   0.000     .0512443    .0765877
        grow |   .0019932   .0003157     6.31   0.000     .0013744    .0026119
incidenc~413 |   .0135924   .0062361     2.18   0.029     .0013698    .0258149
meanreserves |   .0079062   .0020172     3.92   0.000     .0039526    .0118598
ldevelopin~i |    .000678   .0041909     0.16   0.871    -.0075359     .008892
        asia |  -.0000793   .0151616    -0.01   0.996    -.0297955     .029637
    americas |   .1153368   .0130839     8.82   0.000     .0896928    .1409808
       easia |   .0587515   .0190264     3.09   0.002     .0214604    .0960425
         ssa |   .0648929    .012674     5.12   0.000     .0400523    .0897336
       _cons |  -.7282441   .0819119    -8.89   0.000    -.8887884   -.5676998
-------------+----------------------------------------------------------------
      rho_ar |   .2684332   (estimated autocorrelation coefficient)
     sigma_u |  .03763389
     sigma_e |  .06128723
     rho_fov |  .27381882   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0576                                         min =          3
     between = 0.5897                                         avg =       13.6
     overall = 0.3793                                         max =         14

                                                Wald chi2(15)     =     290.39
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2331   0.4662     0.4794     0.4794   0.4794

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0181691    .008443     2.15   0.031     .0016211    .0347171
      allexp |  -.0091649   .0053194    -1.72   0.085    -.0195907    .0012608
       gtime |  -.0003359   .0029637    -0.11   0.910    -.0061448    .0054729
     lgdpcap |    .011236   .0042344     2.65   0.008     .0029366    .0195353
        lpop |   .0221992   .0034774     6.38   0.000     .0153836    .0290149
   lopenness |   .0585617   .0065901     8.89   0.000     .0456454    .0714781
        grow |   .0014149    .000308     4.59   0.000     .0008113    .0020186
incidenc~413 |   .0117503   .0062518     1.88   0.060    -.0005029    .0240036
meanreserves |   .0070333   .0020169     3.49   0.000     .0030803    .0109864
ldevelopin~i |   .0096186     .00428     2.25   0.025     .0012299    .0180074
        asia |   -.010722   .0150592    -0.71   0.476    -.0402375    .0187935
    americas |   .1116692   .0130128     8.58   0.000     .0861646    .1371738
       easia |   .0649033   .0189586     3.42   0.001     .0277451    .1020614
         ssa |   .0581741   .0125394     4.64   0.000     .0335974    .0827508
       _cons |  -.7717686    .081443    -9.48   0.000     -.931394   -.6121432
-------------+----------------------------------------------------------------
      rho_ar |  .30315247   (estimated autocorrelation coefficient)
     sigma_u |  .03697304
     sigma_e |  .06057345
     rho_fov |   .2714387   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0756                                         min =          3
     between = 0.5936                                         avg =       13.6
     overall = 0.3943                                         max =         14

                                                Wald chi2(15)     =     311.19
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2821   0.5377     0.5506     0.5506   0.5506

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0326522   .0083087     3.93   0.000     .0163674    .0489371
      allexp |  -.0067252   .0052207    -1.29   0.198    -.0169576    .0035072
       gtime |  -.0031818   .0028901    -1.10   0.271    -.0088463    .0024827
     lgdpcap |   .0144023   .0043825     3.29   0.001     .0058127    .0229919
        lpop |   .0234855   .0035194     6.67   0.000     .0165876    .0303835
   lopenness |   .0641693   .0062813    10.22   0.000     .0518582    .0764804
        grow |   .0014192   .0003162     4.49   0.000     .0007995     .002039
incidenc~413 |   .0124563   .0063089     1.97   0.048      .000091    .0248216
meanreserves |   .0084516   .0020258     4.17   0.000      .004481    .0124221
ldevelopin~i |   .0005499   .0039489     0.14   0.889    -.0071898    .0082895
        asia |   .0001458   .0153002     0.01   0.992    -.0298422    .0301337
    americas |   .1160255    .013199     8.79   0.000     .0901559    .1418952
       easia |   .0637822   .0191702     3.33   0.001     .0262094     .101355
         ssa |   .0599933   .0128324     4.68   0.000     .0348423    .0851444
       _cons |  -.7283296   .0801933    -9.08   0.000    -.8855056   -.5711536
-------------+----------------------------------------------------------------
      rho_ar |  .17891687   (estimated autocorrelation coefficient)
     sigma_u |  .03935187
     sigma_e |  .06175592
     rho_fov |  .28878496   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved
(20 vars, 1,602 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1997 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,602
Group variable: cowcode                         Number of groups  =        118

R-sq:                                           Obs per group:
     within  = 0.0676                                         min =          3
     between = 0.5884                                         avg =       13.6
     overall = 0.3900                                         max =         14

                                                Wald chi2(15)     =     290.74
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2499   0.4913     0.5046     0.5046   0.5046

------------------------------------------------------------------------------
cub_capexgdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0263204   .0083218     3.16   0.002       .01001    .0426307
      allexp |  -.0073442   .0052384    -1.40   0.161    -.0176113     .002923
       gtime |    .000693   .0029028     0.24   0.811    -.0049964    .0063824
     lgdpcap |   .0089639   .0042294     2.12   0.034     .0006745    .0172533
        lpop |   .0253168   .0034176     7.41   0.000     .0186184    .0320152
   lopenness |   .0680718   .0066693    10.21   0.000     .0550002    .0811435
        grow |   .0011059   .0003096     3.57   0.000     .0004991    .0017127
incidenc~413 |   .0082191   .0062254     1.32   0.187    -.0039825    .0204207
meanreserves |   .0069628   .0019949     3.49   0.000      .003053    .0108727
ldevelopin~i |   .0021701   .0041063     0.53   0.597    -.0058781    .0102183
        asia |  -.0062926   .0150227    -0.42   0.675    -.0357365    .0231513
    americas |   .1184262   .0129761     9.13   0.000     .0929936    .1438588
       easia |   .0562307   .0188794     2.98   0.003     .0192277    .0932337
         ssa |   .0602916   .0125311     4.81   0.000     .0357312     .084852
       _cons |  -.7562045    .080759    -9.36   0.000    -.9144893   -.5979197
-------------+----------------------------------------------------------------
      rho_ar |  .26532181   (estimated autocorrelation coefficient)
     sigma_u |  .03746334
     sigma_e |  .06023508
     rho_fov |  .27892829   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file us_capex_coefs.dta saved

.                         file close myfile

. 
.                         /* see results_us_capex.csv, which is generated by th
> e R code, for model reported in column 1 */
.  
.                 *************************************************************
> **********************
.                 * Footnote about changing the value of the expropriation lag 
> to 6 or 10 (from 8)  *
.                 *************************************************************
> **********************
.                         forval i = 1(1)$m {
  2.                                 import delimited using "$dir\imputed-fdi\p
> rimary`i'.csv",clear
  3.                                 qui:sort cow year
  4.                                 qui:merge cow  year using "$dir\temp.dta"
  5.                                 tab _merge
  6.                                 global cvarlist="allexp6 gtime lgdpcap lpo
> p lopenness grow incidencev413 meanres ldevelopingfdi asia america easia ssa"
  7.                                 qui:tsset cow year
  8.                                 xtserial cub_primaryfdigdp gwf_personal $c
> varlist
  9.                                 qui:xtregar cub_primaryfdigdp gwf_personal
>  $cvarlist, re 
 10.                                 est store primaryallexp6`i'
 11.                                 global cvarlist="allexp10 gtime lgdpcap lp
> op lopenness grow incidencev413 meanres ldevelopingfdi asia america easia ssa
> "
 12.                                 qui:tsset cow year
 13.                                 xtserial cub_primaryfdigdp gwf_personal $c
> varlist
 14.                                 qui:xtregar cub_primaryfdigdp gwf_personal
>  $cvarlist, re 
 15.                                 est store primaryallexp10`i'
 16.                         }
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      1.845
           Prob > F =      0.1795

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      1.847
           Prob > F =      0.1794
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      7.979
           Prob > F =      0.0064

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      7.988
           Prob > F =      0.0064
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      3.965
           Prob > F =      0.0511

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      3.969
           Prob > F =      0.0510
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      1.684
           Prob > F =      0.1994

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      1.682
           Prob > F =      0.1997
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      3.580
           Prob > F =      0.0634

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      3.582
           Prob > F =      0.0633
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      3.171
           Prob > F =      0.0801

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      3.171
           Prob > F =      0.0801
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      2.642
           Prob > F =      0.1094

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      2.640
           Prob > F =      0.1095
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      3.040
           Prob > F =      0.0864

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      3.045
           Prob > F =      0.0862
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =     15.362
           Prob > F =      0.0002

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =     15.366
           Prob > F =      0.0002
(20 vars, 1,782 obs)

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         64        1.78        1.78
          2 |      1,813       50.43       52.21
          3 |      1,718       47.79      100.00
------------+-----------------------------------
      Total |      3,595      100.00

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      7.779
           Prob > F =      0.0071

Wooldridge test for autocorrelation in panel data
H0: no first-order autocorrelation
    F(  1,      59) =      7.782
           Prob > F =      0.0071

.                         
.                                 gen hi =.
(3,595 missing values generated)

.                                 gen lo =.
(3,595 missing values generated)

.                                 gen mhi  =.
(3,595 missing values generated)

.                                 gen mlo =.
(3,595 missing values generated)

.                                 gen b =.
(3,595 missing values generated)

.                                 gen se = .
(3,595 missing values generated)

.                                 gen count =_n

.                                 gen model = ""
(3,595 missing values generated)

.                                 gen variable = ""                       
(3,595 missing values generated)

.                                 global count=10                              
>                                    /* number of specifications to test */

.                                 global ac = $count

.                                 global imp ="primaryallexp6"

.                                 local var = "gwf_pers allexp6 gtime lgdpcap l
> pop lopenness grow incidencev413 meanres ldevelopingfdi"

.                                 foreach cvar of local var {
  2.                                                 global v = "`cvar'"       
>                                       /* name of variable of interest to plot
>  */
  3.                                                 qui:replace variable = "$v
> " if count==$count
  4.                                                 jwmi 
  5.                                 }

symmetric beta[1,1]
          c1
r1  .0586681

symmetric se[1,1]
           c1
r1  .01887364
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
variable model was str1 now str14
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.00784956

symmetric se[1,1]
          c1
r1  .0049772
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .02035936

symmetric se[1,1]
           c1
r1  .00490462
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  -.0397329

symmetric se[1,1]
           c1
r1  .01000933
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00184912

symmetric se[1,1]
           c1
r1  .00708713
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01283796

symmetric se[1,1]
           c1
r1  .01729467
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00264105

symmetric se[1,1]
           c1
r1  .00101402
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
            c1
r1  -.02733011

symmetric se[1,1]
           c1
r1  .01147306
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .01153668

symmetric se[1,1]
           c1
r1  .00452449
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

symmetric beta[1,1]
           c1
r1  .00636105

symmetric se[1,1]
           c1
r1  .00399045
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                                 gen e=round(b,.001)
(3,585 missing values generated)

.                                 gen s=round(se,.001)
(3,585 missing values generated)

.                                 browse variable e s hi lo

.                                 
.                                 twoway (scatter count b if count<=10,ylab(1(1
> )$ac,glcolor(gs16)) mlab(e) mlabpos(12) xlab(-.05(.05).1) ///
>                                 mcolor(gs6) msymbol(plus) yscale(range(0.75 1
> 0.25))  xtitle(Coefficient estimate) xline(0,lpat(dash))) ///
>                                 (rspike hi lo count if count<=10, horizontal 
> ytitle("") title(Expropriation lagged 6 years,size(medium)) ///
>                                 ylab(1 "Total Developing FDI" 2 "Oil reserves
>  per cap. (log)" 3 "Civil conflict"  ///
>                                 4 "Annual GDP Growth" 5 "Trade (log)" 6 "Popu
> lation (log)" 7 "GDP per cap. (log)" ///
>                                 8 "Regime duration" 9 "Expropriations" 10 "{b
> f:Personalist}")  lcolor(gs6) lwidth(medthin) ///
>                                 legend(off) scheme(lean2)) (rspike mhi mlo co
> unt if count<=10, lwidth(thick) lcolor(gs6) horizontal saving(a.gph,replace))
(note: file a.gph not found)
(file a.gph saved)

.  
.                                 drop e s

.                                 
.                                 global imp ="primaryallexp10"

.                                 local var = "gwf_pers allexp10 gtime lgdpcap 
> lpop lopenness grow incidencev413 meanres ldevelopingfdi"

.                                 foreach cvar of local var {
  2.                                                 global v = "`cvar'"       
>                                       /* name of variable of interest to plot
>  */
  3.                                                 qui:replace variable = "$v
> " if count==$count
  4.                                                 jwmi 
  5.                                 }

symmetric beta[1,1]
           c1
r1  .05866639

symmetric se[1,1]
           c1
r1  .01887009
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

symmetric beta[1,1]
           c1
r1  -.0078571

symmetric se[1,1]
           c1
r1  .00494653
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

symmetric beta[1,1]
           c1
r1  .02036292

symmetric se[1,1]
           c1
r1  .00490392
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

symmetric beta[1,1]
            c1
r1  -.03971344

symmetric se[1,1]
           c1
r1  .01000845
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

symmetric beta[1,1]
           c1
r1  .00183186

symmetric se[1,1]
           c1
r1  .00708801
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

symmetric beta[1,1]
           c1
r1  .01276547

symmetric se[1,1]
           c1
r1  .01730509
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

symmetric beta[1,1]
           c1
r1  .00264011

symmetric se[1,1]
           c1
r1  .00101412
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

symmetric beta[1,1]
            c1
r1  -.02729566

symmetric se[1,1]
           c1
r1  .01147135
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

symmetric beta[1,1]
           c1
r1  .01154193

symmetric se[1,1]
           c1
r1  .00452516
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

symmetric beta[1,1]
           c1
r1  .00630939

symmetric se[1,1]
           c1
r1  .00398877
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

.                                 gen e=round(b,.001)
(3,585 missing values generated)

.                                 gen s=round(se,.001)
(3,585 missing values generated)

.                                 browse variable e s hi lo

.                                 twoway (scatter count b if count<=10,ylab(1(1
> )$ac,glcolor(gs16)) mlab(e) mlabpos(12) xlab(-.05(.05).1) ///
>                                 mcolor(gs6) msymbol(plus) yscale(range(0.75 1
> 0.25))  xtitle(Coefficient estimate) xline(0,lpat(dash))) ///
>                                 (rspike hi lo count if count<=10, horizontal 
> ytitle("") title(PExpropriation lagged 10 years,size(medium)) ///
>                                 ylab(1 "Total Developing FDI" 2 "Oil reserves
>  per cap. (log)" 3 "Civil conflict"  ///
>                                 4 "Annual GDP Growth" 5 "Trade (log)" 6 "Popu
> lation (log)" 7 "GDP per cap. (log)" ///
>                                 8 "Regime duration" 9 "Expropriations" 10 "{b
> f:Personalist}")  lcolor(gs6) lwidth(medthin) ///
>                                 legend(off) scheme(lean2)) (rspike mhi mlo co
> unt if count<=10, lwidth(thick) lcolor(gs6) horizontal saving(b.gph,replace))
(note: file b.gph not found)
(file b.gph saved)

.  
.                                 gr combine a.gph b.gph

.                                 graph export "$dir\golden\Exprop-Lags.pdf", a
> s(pdf) replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Exprop-Lags.pdf written in PDF format)

.                                 erase a.gph

.                                 erase b.gph

.                                 
.                                 ************************
.                                 *** Figures 9 and 10 ***
.                                 ************************
.                                 cd "$dir\corruption"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files\corruption

.                                 do rgi

. 
. /* 
> NAME: rgi.do
> USING .dta file(s): 
>         rgi.dta
>         personal.dta
>         noc.dta
> 
> USING .do file(s): NONE
> 
> DESCRIPTION: This program merges data together, creates variable transformati
> ons (including 
>         a personalism index), and analyses the relationship between personali
> sm index and the
>         Resourse Governance Index (RGI)
> 
> AUTHOR: Joseph Wright
> ORIGIN DATE: 11.20.15
> */
. 
. set scheme lean2

. 
. * Merge data sets  *
.         cd "$dir\corruption"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files\corruption

.         use temp,clear

.         sort gwf_country

.         save, replace
file temp.dta saved

.         use noc, clear

.         replace country = "Congo/Zaire" if country == "Congo DRC"
(0 real changes made)

.         replace country = "Congo-Brz" if country == "Congo Br"
(0 real changes made)

.         sort country

.         save, replace
file noc.dta saved

.         use rgi, clear

.         replace country = "Congo/Zaire" if country == "Congo (DRC)"
(0 real changes made)

.         sort country

.         merge country using noc
(note: you are using old merge syntax; see [D] merge for new syntax)

.         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         22       24.72       24.72
          2 |         31       34.83       59.55
          3 |         36       40.45      100.00
------------+-----------------------------------
      Total |         89      100.00

.         rename _merge mergeR1

.         rename country gwf_country  

.         replace gwf_country ="UAE" if gwf_country=="United Arab Emirates"
(1 real change made)

.         sort gwf_country

.         merge gwf_country using temp
(note: you are using old merge syntax; see [D] merge for new syntax)
variable gwf_country does not uniquely identify observations in temp.dta

.         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         42        2.97        2.97
          3 |      1,373       97.03      100.00
------------+-----------------------------------
      Total |      1,415      100.00

.         rename _merge mergeR2

.         list gwf_country if mergeR2==1,clean noobs

                       gwf_country  
                         Australia  
     Australia (Western Australia)  
                           Austria  
                           Bahrain  
                          Barbados  
                            Belize  
                          Botswana  
                            Brunei  
                          Cambodia  
                            Canada  
                  Canada (Alberta)  
                             Chile  
                           Denmark  
                 Equatorial Guinea  
                            Guinea  
                           Liberia  
                          Mongolia  
                           Morocco  
                        Mozambique  
                           Myanmar  
                       Netherlands  
                       New Zealand  
                            Norway  
                  Papua New Guinea  
                       Philippines  
                             Qatar  
                      Sierra Leone  
                      South Africa  
                       South Sudan  
                          Suriname  
                          Tanzania  
                       Timor-Leste  
                   Trinidad Tobago  
               Trinidad and Tobago  
                            Turkey  
                                UK  
                               USA  
                    United Kingdom  
    United States (Gulf of Mexico)  
                             Yemen  
                            Zambia  
                          Zimbabwe  

.         egen meangdp = mean(lgdpcap),by(cow)
(42 missing values generated)

.         gen xoilpc = oilpc if year==2010
(1,370 missing values generated)

.         egen meanoil  = mean(xoilpc),by(cow)
(82 missing values generated)

.         replace meanoil = 6.609899 if country=="Iraq" /* 2003 value */
(25 real changes made)

. 
. 
. * Create personalism index: country-mean of 3 indicators, weighted by autocra
> tic years
.         global yr = 1979

.         egen minyr = min(year) if year>$yr, by(cow)
(82 missing values generated)

.         *replace minyr =  $yr + 1 if country=="Venezuela" | country =="Philip
> pines"  /* not 2006 or 1972*/
.         egen pmaxall = mean(pers) if year>$yr & year<2011, by(cow) 
(82 missing values generated)

.         egen count = count(pers) if year>$yr & year<2011, by(cow) 
(82 missing values generated)

.         gen yrs = count/(2011-minyr)
(82 missing values generated)

.         replace pmaxall = pmaxall*yrs
(87 real changes made)

.         egen m = max(pmaxall),by(cow)
(42 missing values generated)

.         replace pmaxall = m 
(40 real changes made)

.         drop m

.  
. * Personalism and resource governance *
.         egen ctag1 = tag(cow) if composite~=. & pmaxall~=. & gwf_country~="No
> rway"

.         gen carbon = resourcemeasure == "Hydrocarbons"

.         local g ="composit institutionalandlegalsetting reportingpractices sa
> feguardsandqualitycontrols enablingenvironment"

.         foreach c of local g {
  2.                 gen y`c' = `c'/100
  3.                 gen x`c' = logit(`c'/100)
  4.                 spearman `c' pmaxall if ctag1==1
  5.                 qui: reg x`c' pmaxall if ctag1==1,r
  6.                 lincom pmaxall
  7.                 qui: glm y`c' pmaxall if ctag==1,fam(bin) link(logit) vce(
> r)
  8.                 lincom pmaxall
  9.                 qui: glm y`c' pmaxall carbon meangdp meanoil if ctag==1,fa
> m(bin) link(logit) vce(r)
 10.                 lincom pmaxall
 11.         }       
(515 missing values generated)
(515 missing values generated)

 Number of obs =      30
Spearman's rho =      -0.4390

Test of Ho: composite and pmaxall are independent
    Prob > |t| =       0.0152

 ( 1)  pmaxall = 0

------------------------------------------------------------------------------
   xcomposit |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.314807   .4630119    -2.84   0.008    -2.263244   -.3663698
------------------------------------------------------------------------------

 ( 1)  [ycomposit]pmaxall = 0

------------------------------------------------------------------------------
   ycomposit |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.210998   .4187481    -2.89   0.004    -2.031729   -.3902666
------------------------------------------------------------------------------

 ( 1)  [ycomposit]pmaxall = 0

------------------------------------------------------------------------------
   ycomposit |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.8769146    .431635    -2.03   0.042    -1.722904   -.0309256
------------------------------------------------------------------------------
(515 missing values generated)
(516 missing values generated)

 Number of obs =      30
Spearman's rho =      -0.5032

Test of Ho: institutionalandle~g and pmaxall are independent
    Prob > |t| =       0.0046

 ( 1)  pmaxall = 0

------------------------------------------------------------------------------
xinstituti~g |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.719222   .6626924    -2.59   0.015    -3.076686    -.361758
------------------------------------------------------------------------------

 ( 1)  [yinstitutionalandlegalsetting]pmaxall = 0

------------------------------------------------------------------------------
yinstituti~g |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.456248   .5635958    -2.58   0.010    -2.560875   -.3516204
------------------------------------------------------------------------------

 ( 1)  [yinstitutionalandlegalsetting]pmaxall = 0

------------------------------------------------------------------------------
yinstituti~g |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.099009   .5800447    -1.89   0.058    -2.235876    .0378577
------------------------------------------------------------------------------
(515 missing values generated)
(515 missing values generated)

 Number of obs =      30
Spearman's rho =      -0.3658

Test of Ho: reportingpractices and pmaxall are independent
    Prob > |t| =       0.0468

 ( 1)  pmaxall = 0

------------------------------------------------------------------------------
xreporting~s |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.103067   .4492818    -2.46   0.021     -2.02338   -.1827555
------------------------------------------------------------------------------

 ( 1)  [yreportingpractices]pmaxall = 0

------------------------------------------------------------------------------
yreporting~s |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.005003   .4086737    -2.46   0.014    -1.805989   -.2040176
------------------------------------------------------------------------------

 ( 1)  [yreportingpractices]pmaxall = 0

------------------------------------------------------------------------------
yreporting~s |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.8000915   .4682782    -1.71   0.088      -1.7179    .1177168
------------------------------------------------------------------------------
(515 missing values generated)
(534 missing values generated)

 Number of obs =      30
Spearman's rho =      -0.4738

Test of Ho: safeguardsandquali~s and pmaxall are independent
    Prob > |t| =       0.0082

 ( 1)  pmaxall = 0

------------------------------------------------------------------------------
xsafeguard~s |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -2.096647    .756539    -2.77   0.010    -3.648937   -.5443572
------------------------------------------------------------------------------

 ( 1)  [ysafeguardsandqualitycontrols]pmaxall = 0

------------------------------------------------------------------------------
ysafeguard~s |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.665654   .6234255    -2.67   0.008    -2.887545    -.443762
------------------------------------------------------------------------------

 ( 1)  [ysafeguardsandqualitycontrols]pmaxall = 0

------------------------------------------------------------------------------
ysafeguard~s |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.159896   .6494436    -1.79   0.074    -2.432782    .1129902
------------------------------------------------------------------------------
(515 missing values generated)
(515 missing values generated)

 Number of obs =      30
Spearman's rho =      -0.3309

Test of Ho: enablingenvironment and pmaxall are independent
    Prob > |t| =       0.0741

 ( 1)  pmaxall = 0

------------------------------------------------------------------------------
xenablinge~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.372214   .6950649    -1.97   0.058     -2.79599    .0515617
------------------------------------------------------------------------------

 ( 1)  [yenablingenvironment]pmaxall = 0

------------------------------------------------------------------------------
yenablinge~t |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -1.128776   .6238085    -1.81   0.070    -2.351418    .0938659
------------------------------------------------------------------------------

 ( 1)  [yenablingenvironment]pmaxall = 0

------------------------------------------------------------------------------
yenablinge~t |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.7147499   .6397179    -1.12   0.264    -1.968574    .5390742
------------------------------------------------------------------------------

. 
. * Personalism RGI plot, composite *
.         twoway lfit composit pmax if ctag1==1,   /*
>         */ scheme(lean2) ytitle(Composite score,size(medsmall)) xtitle(Person
> alism,size(medsmall)) title(Bivariate correlation,size(medium)) /*
>         */ ylab(0 (20) 100,glcolor(gs15)) xscale(range(-.05 .9)) yscale(range
> (0 100)) || /*
>         */ scatter composit pmax if ctag1==1, msymbol(oh) mlab(StateAB) /*
>         */ xsize(3) ysize(2.5)  legend(size(small) label(3 "Observed") pos(6)
>  ring(1) col(3)) 

.         graph export "$dir\golden\Personal-RGI.pdf", as(pdf)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Personal-RGI.pdf written in PDF format)

.         graph export "$dir\golden\ISQ-Figure-9.1.png", as(png)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-9.1.png written in PNG format)

. 
.  * Personalism RGI plot, composite, drop Turk *
.         twoway lfit composit pmax if ctag1==1 & country~="Turkmenistan" & cou
> ntry~="Myanmar",   /*
>         */ scheme(lean2) ytitle(Composite score,size(medsmall)) xtitle(Person
> alism,size(medsmall)) title(Bivariate correlation,size(medsmall)) /*
>         */ ylab(0 (20) 100,glcolor(gs15)) xscale(range(-.05 .9)) yscale(range
> (0 100)) || /*
>         */ scatter composit pmax if ctag1==1 & country~="Turkmenistan" & coun
> try~="Myanmar", msymbol(oh) mlab(StateAB) /*
>         */ xsize(3) ysize(2.5)  legend(size(small) label(3 "Observed") pos(6)
>  ring(1) col(3)) 

.         graph export "$dir\golden\Personal-RGI-no-outliers.pdf", as(pdf)   re
> place
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Personal-RGI-no-outliers.pdf written in PDF for
> mat)

. 
.         * Each sub-component of RGI *
.         twoway qfitci instit pmax if ctag1==1, saving(t2, replace) ciplot(rli
> ne) level(90)  /*
>         */ scheme(lean2) ytitle(Institutions) xtitle("") /*
>         */ ylab(0 (20) 80,glcolor(gs15)) yscale(range(0 80)) || /*
>         */ scatter instit pmax if ctag1==1, msymbol(oh) legend(off)
(note: file t2.gph not found)
(file t2.gph saved)

.         twoway qfitci reporting pmax if ctag1==1, saving(t3, replace) ciplot(
> rline) level(90)  /*
>         */ scheme(lean2) ytitle(Reporting) xtitle("") /*
>         */ ylab(0 (20) 80,glcolor(gs15)) yscale(range(0 80)) || /*
>         */ scatter reporting pmax if ctag1==1, msymbol(oh) legend(off)
(note: file t3.gph not found)
(file t3.gph saved)

.         twoway qfitci safeg pmax if ctag1==1, saving(t4, replace) ciplot(rlin
> e) level(90)  /*
>         */ scheme(lean2) ytitle(Safeguards) xtitle("") /*
>         */ ylab(0 (20) 80,glcolor(gs15)) yscale(range(0 80)) || /*
>         */ scatter safeg pmax if ctag1==1, msymbol(oh)legend(off)
(note: file t4.gph not found)
(file t4.gph saved)

.         twoway qfitci enabl pmax if ctag1==1, saving(t5, replace) ciplot(rlin
> e) level(90)  /*
>         */ scheme(lean2) ytitle(Enabling) xtitle("") /*
>         */ ylab(0 (20) 80,glcolor(gs15)) yscale(range(0 80)) || /*
>         */ scatter enabl pmax if ctag1==1, msymbol(oh)  legend(off)
(note: file t5.gph not found)
(file t5.gph saved)

.         graph combine t2.gph t3.gph t4.gph t5.gph, col(2) xsize(4) ysize(4) x
> common scheme(lean2) b1(Personalism)

.         graph export "$dir\golden\Personal-RGI-Items.pdf", as(pdf)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Personal-RGI-Items.pdf written in PDF format)

.         erase t2.gph

.         erase t3.gph

.         erase t4.gph

.         erase t5.gph

. 
. * Personalism and Ownership structure *
.         egen ctag2 = tag(cow) if regnoc~=. & pmax~=.  & gwf_country~="Norway"

.         label define xnoc 0 "No NOC/Non-Reg" 1 "Regulatory NOC"

.         label val regnoc xnoc

.         sum pmax if ctag2==1, detail

                           pmaxall
-------------------------------------------------------------
      Percentiles      Smallest
 1%            0              0
 5%            0              0
10%            0              0       Obs                  47
25%     .0967742              0       Sum of Wgt.          47

50%     .3026316                      Mean           .3167396
                        Largest       Std. Dev.      .2419019
75%           .5       .7419355
90%     .6842105            .75       Variance       .0585165
95%          .75       .7580645       Skewness       .2415637
99%     .7822581       .7822581       Kurtosis       1.942758

.         gen highp = pmax>.2

.         tab highp regnoc if ctag2==1, row

+----------------+
| Key            |
|----------------|
|   frequency    |
| row percentage |
+----------------+

           |        Reg NOC
     highp | No NOC/No  Regulator |     Total
-----------+----------------------+----------
         0 |        11          6 |        17 
           |     64.71      35.29 |    100.00 
-----------+----------------------+----------
         1 |        13         17 |        30 
           |     43.33      56.67 |    100.00 
-----------+----------------------+----------
     Total |        24         23 |        47 
           |     51.06      48.94 |    100.00 


.         table regnoc if ctag2==1, c(n pmax mean pmax median pmax)

------------------------------------------------------------
       Reg NOC |    N(pmaxall)  mean(pmaxall)   med(pmaxall)
---------------+--------------------------------------------
No NOC/Non-Reg |            24       .2583159       .2096774
Regulatory NOC |            23       .3777035       .4032258
------------------------------------------------------------

.  
. * Resource governance, Ownership, and Personalism *
.         gen lxcomp = ln(1+abs(xcomp))
(515 missing values generated)

.         replace lxcomp = lxcomp*-1 if xcomp<=0
(544 real changes made)

.         egen ctag3 =tag(cow) if  pmax~=. & comp~=.  & gwf_country~="Norway"

.         reg lxcomp  carbon meangdp meanoil pmax if ctag3==1,r

Linear regression                               Number of obs     =         29
                                                F(4, 24)          =       2.31
                                                Prob > F          =     0.0875
                                                R-squared         =     0.2760
                                                Root MSE          =     .47102

------------------------------------------------------------------------------
             |               Robust
      lxcomp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      carbon |   .2025429   .4366158     0.46   0.647    -.6985878    1.103674
     meangdp |   .2809776   .1607657     1.75   0.093    -.0508265    .6127818
     meanoil |   -.167714   .1179416    -1.42   0.168    -.4111334    .0757054
     pmaxall |  -.6649494   .3474897    -1.91   0.068    -1.382133     .052234
       _cons |  -1.185317   .8521614    -1.39   0.177    -2.944091     .573458
------------------------------------------------------------------------------

.         avplot pmax,ylab(-1 (1) 1,glcolor(gs15)) mlab(StateAB) mlabpos(12) xs
> cale(range(-.4 .4)) /*
>         */ xtitle("e(Personalism|X)") ytitle("e(Composite RGI score|X)")

.         graph export "$dir\golden\Personal-RGI-Avplot.pdf", as(pdf)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Personal-RGI-Avplot.pdf written in PDF format)

.         reg lxcomp  carbon meangdp meanoil pmax if ctag3==1 & country~="Turkm
> enistan",r

Linear regression                               Number of obs     =         28
                                                F(4, 23)          =       2.11
                                                Prob > F          =     0.1126
                                                R-squared         =     0.2710
                                                Root MSE          =     .42291

------------------------------------------------------------------------------
             |               Robust
      lxcomp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      carbon |   .0561268   .4003444     0.14   0.890    -.7720487    .8843022
     meangdp |   .1819217   .1302847     1.40   0.176    -.0875928    .4514361
     meanoil |  -.0971166    .096235    -1.01   0.323    -.2961937    .1019606
     pmaxall |   -.763861   .3266073    -2.34   0.028      -1.4395   -.0882223
       _cons |  -.6556514   .6850572    -0.96   0.348      -2.0728    .7614975
------------------------------------------------------------------------------

.         avplot pmax,ylab(-1 (1) 1,glcolor(gs15)) mlab(StateAB) mlabpos(6) xsc
> ale(range(-.4 .4)) /*
>         */ xtitle("e(Personalism|X)") ytitle("e(Composite RGI score|X)")

.         graph export "$dir\golden\Personal-RGI-Avplot-No-Turkmenistan.pdf", a
> s(pdf)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Personal-RGI-Avplot-No-Turkmenistan.pdf written
>  in PDF format)

.         
.         
.         *********************
.         ** Reported models **
.         *********************
.                 * Base model * 
.         gen comp  = comp/100
(515 missing values generated)

.         glm comp pmax meangdp carbon meanoil if ctag1==1 , fam(bin) link(logi
> t) vce(r)
note: comp has noninteger values

Iteration 0:   log pseudolikelihood = -13.368311  
Iteration 1:   log pseudolikelihood = -13.368091  
Iteration 2:   log pseudolikelihood = -13.368091  

Generalized linear models                         No. of obs      =         29
Optimization     : ML                             Residual df     =         24
                                                  Scale parameter =          1
Deviance         =  2.503598642                   (1/df) Deviance =   .1043166
Pearson          =  2.340158053                   (1/df) Pearson  =   .0975066

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   1.266765
Log pseudolikelihood =  -13.3680907               BIC             =   -78.3115

------------------------------------------------------------------------------
             |               Robust
        comp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     pmaxall |  -.8769146    .431635    -2.03   0.042    -1.722904   -.0309256
     meangdp |   .3800168   .2105735     1.80   0.071    -.0326997    .7927333
      carbon |   .2978956   .5417321     0.55   0.582    -.7638799    1.359671
     meanoil |  -.2312089   .1533288    -1.51   0.132    -.5317279    .0693101
       _cons |   -1.59388   1.100046    -1.45   0.147    -3.749931    .5621706
------------------------------------------------------------------------------

.         est store x1

.         glm comp pmax meangdp carbon if ctag1==1 & regnoc~=., fam(bin) link(l
> ogit) vce(r)
note: comp has noninteger values

Iteration 0:   log pseudolikelihood = -13.952591  
Iteration 1:   log pseudolikelihood = -13.952442  
Iteration 2:   log pseudolikelihood = -13.952442  

Generalized linear models                         No. of obs      =         30
Optimization     : ML                             Residual df     =         26
                                                  Scale parameter =          1
Deviance         =  2.939310694                   (1/df) Deviance =   .1130504
Pearson          =  2.716485927                   (1/df) Pearson  =   .1044802

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   1.196829
Log pseudolikelihood = -13.95244197               BIC             =  -85.49182

------------------------------------------------------------------------------
             |               Robust
        comp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     pmaxall |  -1.387564   .4370171    -3.18   0.001    -2.244101    -.531026
     meangdp |   .1403963   .1058638     1.33   0.185    -.0670929    .3478854
      carbon |  -.4211319   .3369939    -1.25   0.211    -1.081628    .2393641
       _cons |  -.3385426   .7163164    -0.47   0.636    -1.742497    1.065412
------------------------------------------------------------------------------

.         krls comp pmax meangdp carbon if ctag1==1
Iteration =  1, Looloss: 4.929464  
Iteration =  2, Looloss: 4.901233  
Iteration =  3, Looloss: 4.887804  
Iteration =  4, Looloss: 4.888657  

Pointwise Derivatives                                 Number of obs =       30 
                                                      Lambda        =    4.677 
                                                      Tolerance     =      .03 
                                                      Sigma         =        3 
                                                      Eff. df       =     3.13 
                                                      R2            =    .2137 
                                                      Looloss       =    4.881

    comp |      Avg.       SE        t    P>|t|        P25       P50       P75 
>       
---------+--------------------------------------------------------------------
 pmaxall | -.103884   .041264   -2.518    0.018   -.171542  -.110543  -.022016 
>  
 meangdp |  .008051   .009624    0.837    0.410   -.002916   .005415   .017317 
>  
 *carbon | -.026126   .037985   -0.688    0.497   -.057475  -.030187  -.000185 
>  
---------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.                 * Add NOC *
.         glm comp pmax meangdp carbon meanoil regnoc if ctag1==1, fam(bin) lin
> k(logit) vce(r)
note: comp has noninteger values

Iteration 0:   log pseudolikelihood = -13.294028  
Iteration 1:   log pseudolikelihood = -13.293856  
Iteration 2:   log pseudolikelihood = -13.293856  

Generalized linear models                         No. of obs      =         29
Optimization     : ML                             Residual df     =         23
                                                  Scale parameter =          1
Deviance         =  2.355128806                   (1/df) Deviance =   .1023969
Pearson          =  2.201763855                   (1/df) Pearson  =   .0957289

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   1.330611
Log pseudolikelihood = -13.29385578               BIC             =  -75.09268

------------------------------------------------------------------------------
             |               Robust
        comp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     pmaxall |  -.6792994   .4057611    -1.67   0.094    -1.474577    .1159778
     meangdp |   .2245479   .2040894     1.10   0.271    -.1754599    .6245558
      carbon |   .3655419   .5133044     0.71   0.476    -.6405162      1.3716
     meanoil |  -.1620625   .1514087    -1.07   0.284    -.4588182    .1346931
      regnoc |  -.3871359   .1638144    -2.36   0.018    -.7082062   -.0660657
       _cons |  -.7083318   1.075119    -0.66   0.510    -2.815526    1.398863
------------------------------------------------------------------------------

.         est store x2

.         krls comp pmax meangdp carbon meanoil regnoc if ctag1==1
Iteration =  1, Looloss: 4.486606  
Iteration =  2, Looloss: 4.412294  
Iteration =  3, Looloss: 4.333795  
Iteration =  4, Looloss: 4.270225  
Iteration =  5, Looloss: 4.271925  
Iteration =  6, Looloss: 4.249598  

Pointwise Derivatives                                 Number of obs =       29 
                                                      Lambda        =     2.21 
                                                      Tolerance     =     .029 
                                                      Sigma         =        5 
                                                      Eff. df       =    5.426 
                                                      R2            =     .389 
                                                      Looloss       =    4.244

    comp |      Avg.       SE        t    P>|t|        P25       P50       P75 
>       
---------+--------------------------------------------------------------------
 pmaxall | -.055403   .043214   -1.282    0.212   -.117527   -.04923  -.012207 
>  
 meangdp |   .00256   .008614    0.297    0.769   -.008348   2.0e-06   .012227 
>  
 *carbon |  -.02323   .030805   -0.754    0.458    -.05477  -.026604    .01677 
>  
 meanoil | -.009534   .004366   -2.184    0.039   -.015943  -.012139  -.007341 
>  
 *regnoc | -.076781    .03786   -2.028    0.054   -.100799  -.086596  -.055166 
>  
---------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.                 * Drop carbon *
.         tab carbon if e(sample)

     carbon |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |          4       13.79       13.79
          1 |         25       86.21      100.00
------------+-----------------------------------
      Total |         29      100.00

.         glm comp pmax meangdp meanoil regnoc if ctag1==1, fam(bin) link(logit
> ) vce(r)
note: comp has noninteger values

Iteration 0:   log pseudolikelihood = -13.313874  
Iteration 1:   log pseudolikelihood = -13.313752  
Iteration 2:   log pseudolikelihood = -13.313752  

Generalized linear models                         No. of obs      =         29
Optimization     : ML                             Residual df     =         24
                                                  Scale parameter =          1
Deviance         =  2.394920494                   (1/df) Deviance =   .0997884
Pearson          =  2.239314758                   (1/df) Pearson  =   .0933048

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   1.263017
Log pseudolikelihood = -13.31375163               BIC             =  -78.42018

------------------------------------------------------------------------------
             |               Robust
        comp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     pmaxall |  -.8311143    .336592    -2.47   0.014    -1.490823   -.1714061
     meangdp |   .1741902   .1795155     0.97   0.332    -.1776537    .5260341
     meanoil |  -.0985955   .1144668    -0.86   0.389    -.3229463    .1257552
      regnoc |  -.3682978   .1670193    -2.21   0.027    -.6956496   -.0409459
       _cons |  -.3499164    .839823    -0.42   0.677    -1.995939    1.296107
------------------------------------------------------------------------------

.         krls comp pmax meangdp meanoil regnoc if ctag1==1
Iteration =  1, Looloss: 4.343416  
Iteration =  2, Looloss: 4.219048  
Iteration =  3, Looloss: 4.090069  
Iteration =  4, Looloss: 3.983536  
Iteration =  5, Looloss: 3.936655  
Iteration =  6, Looloss: 3.944202  

Pointwise Derivatives                                 Number of obs =       29 
                                                      Lambda        =    1.894 
                                                      Tolerance     =     .029 
                                                      Sigma         =        4 
                                                      Eff. df       =    5.959 
                                                      R2            =    .4501 
                                                      Looloss       =    3.922

    comp |      Avg.       SE        t    P>|t|        P25       P50       P75 
>       
---------+--------------------------------------------------------------------
 pmaxall | -.060981   .045919   -1.328    0.196   -.134368  -.058896   .003881 
>  
 meangdp |  .003405   .009392    0.363    0.720   -.011261   .001882   .015796 
>  
 meanoil | -.010956   .004716   -2.323    0.029   -.019175  -.015316  -.008054 
>  
 *regnoc | -.090101   .040249   -2.239    0.034   -.118804  -.099299  -.053913 
>  
---------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.     krls comp pmax regnoc if e(sample)==1
Iteration =  1, Looloss: 4.235379  
Iteration =  2, Looloss: 4.135821  
Iteration =  3, Looloss: 4.053569  
Iteration =  4, Looloss: 3.993644  
Iteration =  5, Looloss: 3.953028  
Iteration =  6, Looloss: 3.926807  

Pointwise Derivatives                                 Number of obs =       29 
                                                      Lambda        =     .806 
                                                      Tolerance     =     .029 
                                                      Sigma         =        2 
                                                      Eff. df       =    5.293 
                                                      R2            =    .4066 
                                                      Looloss       =    3.913

    comp |      Avg.       SE        t    P>|t|        P25       P50       P75 
>       
---------+--------------------------------------------------------------------
 pmaxall |  -.21219   .077586   -2.735    0.011   -.459781  -.174592   .052832 
>  
 *regnoc | -.113619   .061456   -1.849    0.075   -.176263  -.103413  -.066185 
>  
---------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.     krls comp regnoc if e(sample)==1
Iteration =  1, Looloss: 4.199604  

Pointwise Derivatives                                Number of obs =       29 
                                                     Lambda        =    5.378 
                                                     Tolerance     =     .029 
                                                     Sigma         =        1 
                                                     Eff. df       =    1.441 
                                                     R2            =    .1944 
                                                     Looloss       =    4.183

   comp |      Avg.       SE        t    P>|t|        P25       P50       P75  
>      
--------+--------------------------------------------------------------------
*regnoc | -.110024    .05636   -1.952    0.061   -.110024  -.110024  -.110024  
--------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.         krls comp pmax if e(sample)==1
Iteration =  1, Looloss: 4.452417  
Iteration =  2, Looloss: 4.418427  
Iteration =  3, Looloss: 4.423184  

Pointwise Derivatives                                 Number of obs =       29 
                                                      Lambda        =    4.523 
                                                      Tolerance     =     .029 
                                                      Sigma         =        1 
                                                      Eff. df       =     2.32 
                                                      R2            =    .1957 
                                                      Looloss       =    4.407

    comp |      Avg.       SE        t    P>|t|        P25       P50       P75 
>       
---------+--------------------------------------------------------------------
 pmaxall | -.142929   .052372   -2.729    0.011   -.349159  -.106076  -.013205 
>  
---------+--------------------------------------------------------------------


.         
.         label var regnoc "Regulatory NOC"

.         label var pmax "{bf:Personalism}"

.         label var carbon "Hydrocarbons"

.         label var meangdp "GDP pc (log)"

.         label var meanoil "Oil rents (log)"

.         coefplot (x1,  msymbol(T) mcolor($color1) ciopts(lpat(solid)lcol($col
> or1 $color1))) (x2, msymbol(S) mcolor($color3) ciopts(lpat(solid)lcol($color3
>  $color3))) , /*
>                         */ title("Conditional correlation",size(medium))  ord
> er(pmaxall regnoc meangdp carbon) /*
>                         */ scheme(lean2) drop(_cons) xlab(-2 (1) 1) xline(0, 
> lpattern(dash)) grid(glcolor(gs15)) mfcolor(white) /*
>                         */ ysize(2.5) xsize(2.85)  mlabel format(%9.1f) mlabs
> ize(vsmall) mlabposition(11) mlabgap(*1) /*
>                         */ legend(label(3 "45 countries") label(6 "31 countri
> es") size(small)  pos(6) ring(1.5) col(2))  /*
>                         */ levels(95 90) xtitle("  Coefficient estimate", hei
> ght(6) size(medsmall))    

.         graph export "$dir\golden\Personal-RGI-Controls.pdf", as(pdf)   repla
> ce
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Personal-RGI-Controls.pdf written in PDF format
> )

.         graph export "$dir\golden\ISQ-Figure-9.2.png", as(png)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-9.2.png written in PNG format)

. 
.         gen xregnoc = regnoc
(22 missing values generated)

.         recode xregnoc (.=0)
(xregnoc: 22 changes made)

.         glm comp xregnoc carbon pmax meangdp meanoil if ctag1==1, fam(bin) li
> nk(logit) vce(r)
note: comp has noninteger values

Iteration 0:   log pseudolikelihood = -13.294028  
Iteration 1:   log pseudolikelihood = -13.293856  
Iteration 2:   log pseudolikelihood = -13.293856  

Generalized linear models                         No. of obs      =         29
Optimization     : ML                             Residual df     =         23
                                                  Scale parameter =          1
Deviance         =  2.355128806                   (1/df) Deviance =   .1023969
Pearson          =  2.201763855                   (1/df) Pearson  =   .0957289

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   1.330611
Log pseudolikelihood = -13.29385578               BIC             =  -75.09268

------------------------------------------------------------------------------
             |               Robust
        comp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     xregnoc |  -.3871359   .1638144    -2.36   0.018    -.7082062   -.0660657
      carbon |   .3655419   .5133044     0.71   0.476    -.6405162      1.3716
     pmaxall |  -.6792994   .4057611    -1.67   0.094    -1.474577    .1159778
     meangdp |   .2245479   .2040894     1.10   0.271    -.1754599    .6245558
     meanoil |  -.1620625   .1514087    -1.07   0.284    -.4588182    .1346931
       _cons |  -.7083318   1.075119    -0.66   0.510    -2.815526    1.398863
------------------------------------------------------------------------------

. 
.         *** Table reported in Appendix ***
.         replace meanoil = meanres if meanoil==.
(15 real changes made)

.         sum yinstitutionalandlegalsetting yreportingpractices ysafeguardsandq
> ualitycontrols yenablingenvironment

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
yinstituti~g |        900    .5673444    .1978408        .08          1
yreporting~s |        900    .5024556    .1715761        .04        .97
ysafeguard~s |        900    .5165444    .2230653          0        .98
yenablinge~t |        900    .3424778    .1913786        .02        .98

.         glm yinstitutionalandlegalsetting pmax meangdp carbon meanoil  if cta
> g1==1, fam(bin) link(logit) vce(r)
note: yinstitutionalandlegalsetting has noninteger values

Iteration 0:   log pseudolikelihood = -13.663573  
Iteration 1:   log pseudolikelihood = -13.661289  
Iteration 2:   log pseudolikelihood = -13.661289  

Generalized linear models                         No. of obs      =         30
Optimization     : ML                             Residual df     =         25
                                                  Scale parameter =          1
Deviance         =  3.388628779                   (1/df) Deviance =   .1355452
Pearson          =  3.258593039                   (1/df) Pearson  =   .1303437

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   1.244086
Log pseudolikelihood = -13.66128892               BIC             =  -81.64131

------------------------------------------------------------------------------
             |               Robust
yinstituti~g |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     pmaxall |  -1.068397   .5710141    -1.87   0.061    -2.187564    .0507706
     meangdp |   .1314478   .1777184     0.74   0.460    -.2168738    .4797694
      carbon |  -.1377983   .5649202    -0.24   0.807    -1.245022     .969425
     meanoil |  -.1919487   .1252197    -1.53   0.125    -.4373747    .0534773
       _cons |   .8503057   1.053346     0.81   0.420    -1.214214    2.914825
------------------------------------------------------------------------------

.         glm yreportingpractices pmax meangdp carbon meanoil  if ctag1==1, fam
> (bin) link(logit) vce(r)
note: yreportingpractices has noninteger values

Iteration 0:   log pseudolikelihood = -13.856025  
Iteration 1:   log pseudolikelihood = -13.855686  
Iteration 2:   log pseudolikelihood = -13.855686  

Generalized linear models                         No. of obs      =         30
Optimization     : ML                             Residual df     =         25
                                                  Scale parameter =          1
Deviance         =   2.90508231                   (1/df) Deviance =   .1162033
Pearson          =  2.703768697                   (1/df) Pearson  =   .1081507

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   1.257046
Log pseudolikelihood = -13.85568551               BIC             =  -82.12485

------------------------------------------------------------------------------
             |               Robust
yreporting~s |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     pmaxall |  -.7847218   .4688322    -1.67   0.094    -1.703616    .1341724
     meangdp |   .4591655    .171098     2.68   0.007     .1238196    .7945115
      carbon |   .2808699   .6095182     0.46   0.645    -.9137639    1.475504
     meanoil |  -.2291111   .1292821    -1.77   0.076    -.4824993    .0242771
       _cons |  -2.136584   .9556785    -2.24   0.025     -4.00968   -.2634887
------------------------------------------------------------------------------

.         glm ysafeguardsandqualitycontrols pmax meangdp carbon meanoil  if cta
> g1==1, fam(bin) link(logit) vce(r)
note: ysafeguardsandqualitycontrols has noninteger values

Iteration 0:   log pseudolikelihood = -14.123731  
Iteration 1:   log pseudolikelihood = -14.122803  
Iteration 2:   log pseudolikelihood = -14.122803  

Generalized linear models                         No. of obs      =         30
Optimization     : ML                             Residual df     =         25
                                                  Scale parameter =          1
Deviance         =  5.304287795                   (1/df) Deviance =   .2121715
Pearson          =  4.763351916                   (1/df) Pearson  =   .1905341

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   1.274854
Log pseudolikelihood = -14.12280263               BIC             =  -79.72565

------------------------------------------------------------------------------
             |               Robust
ysafeguard~s |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     pmaxall |  -1.155888   .6510719    -1.78   0.076    -2.431966    .1201889
     meangdp |   .3667584    .211095     1.74   0.082    -.0469802     .780497
      carbon |   .7039638   .5532955     1.27   0.203    -.3804755    1.788403
     meanoil |  -.2867477   .1520196    -1.89   0.059    -.5847006    .0112052
       _cons |  -1.292175   1.183127    -1.09   0.275    -3.611061    1.026711
------------------------------------------------------------------------------

.         glm yenablingenvironment pmax meangdp carbon meanoil  if ctag1==1, fa
> m(bin) link(logit) vce(r)
note: yenablingenvironment has noninteger values

Iteration 0:   log pseudolikelihood =  -12.75199  
Iteration 1:   log pseudolikelihood = -12.745557  
Iteration 2:   log pseudolikelihood = -12.745555  
Iteration 3:   log pseudolikelihood = -12.745555  

Generalized linear models                         No. of obs      =         30
Optimization     : ML                             Residual df     =         25
                                                  Scale parameter =          1
Deviance         =  3.294139802                   (1/df) Deviance =   .1317656
Pearson          =  3.073428887                   (1/df) Pearson  =   .1229372

Variance function: V(u) = u*(1-u/1)               [Binomial]
Link function    : g(u) = ln(u/(1-u))             [Logit]

                                                  AIC             =   1.183037
Log pseudolikelihood =   -12.745555               BIC             =  -81.73579

------------------------------------------------------------------------------
             |               Robust
yenablinge~t |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     pmaxall |  -.7836269   .6468261    -1.21   0.226    -2.051383    .4841289
     meangdp |   .6456558   .1810522     3.57   0.000        .2908    1.000512
      carbon |   .5386164   .7104898     0.76   0.448    -.8539181    1.931151
     meanoil |  -.3146593   .1422967    -2.21   0.027    -.5935557   -.0357629
       _cons |  -4.025237   1.171149    -3.44   0.001    -6.320646   -1.729828
------------------------------------------------------------------------------

.  
.         
. ***********   The End  *************
. 
. 
end of do-file

.                                 do corruption

. /* 
> NAME: corruption.do
> USING .dta file(s): 
>         corruption.dta
>         noc.dta
>         aid-merge.dta
> 
> 
> USING .do file(s): cowcodes.do
> 
> DESCRIPTION: This program merges data together, creates variable transformati
> ons (including 
>         a personalism index), and analyses the relationship between personali
> sm index and FPCA
>         corruption cases.
> 
> AUTHOR: Joseph Wright
> ORIGIN DATE: 11.20.15
> LAST UPDATE: 02.16.17
> 
> */
. 
. use   "$dir\temp.dta",clear

. cd "$dir\corruption"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files\corruption

. sort cow year

. 
. ** merge aid data **
. merge cow year using aid-merge
(note: you are using old merge syntax; see [D] merge for new syntax)

. tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        444        5.74        5.74
          2 |      4,200       54.33       60.07
          3 |      3,087       39.93      100.00
------------+-----------------------------------
      Total |      7,731      100.00

. drop if _merge==2
(4,200 observations deleted)

. rename _merge _merge2

. recode milaid econaid l12milaid lnl12milaid l12econaid lnl12econaid (.=0)
(milaid: 444 changes made)
(econaid: 444 changes made)
(l12milaid: 444 changes made)
(lnl12milaid: 444 changes made)
(l12econaid: 444 changes made)
(lnl12econaid: 444 changes made)

. sort cow year

. save temp, replace
file temp.dta saved

. 
. ** merge corruption and personal data **
. use corruption, clear

. egen tag = tag(country year)

. keep if tag==1
(15 observations deleted)

. drop tag

. gen cowcode=.
(66 missing values generated)

. qui do cowcodes

. sort cow year

. merge cow year using temp
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: variable year was int, now float to accommodate using data's values)
(note: variable country was str17, now str43 to accommodate using data's
       values)

. tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         31        0.87        0.87
          2 |      3,496       98.15       99.02
          3 |         35        0.98      100.00
------------+-----------------------------------
      Total |      3,562      100.00

. gen case = _merge==3 if _merge~=1
(31 missing values generated)

. rename _merge _merge1

. gen syear  = year(gwf_start)
(1,231 missing values generated)

. egen minyear = min(syear), by(cow)
(393 missing values generated)

. replace minyear = minyear-1918
(3,169 real changes made)

. replace minyear = 0 if minyear<0 & gwf_case_fail~=.
(63 real changes made)

. sort cow  year

. save temp, replace
file temp.dta saved

. 
. ** merge oil company ownership **
. use noc, clear

. gen cowcode=.
(67 missing values generated)

. qui do cowcodes

. sort cow 

. merge cow using temp
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: variable country was str20, now str43 to accommodate using data's
       values)
variable cowcode does not uniquely identify observations in temp.dta

. tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         18        0.50        0.50
          2 |      2,163       60.42       60.92
          3 |      1,399       39.08      100.00
------------+-----------------------------------
      Total |      3,580      100.00

. rename _merge _merge3

. sort cow year

. save temp, replace
file temp.dta saved

. 
.  
. ** keep only years after FPCA creation (1977) & oil producing countries **
. keep if year>1977 & year<=2010 & _merge3==3   & gwf_duration~=. & oecd1==0
(2,207 observations deleted)

. sort cow year

. save temp, replace
file temp.dta saved

. 
. ****************************
. ** Cross-section analysis **
. ****************************
.         tsset cow year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1979 to 2010, but with gaps
                delta:  1 unit

.         egen maxcase = max(case), by(gwf_casename)

.         egen meanoil = mean(oilpc),by(gwf_casename)

.         egen meanpop = mean(lpop),by(gwf_casename)

.         egen meangdp = mean(lgdpcap),by(gwf_casename)
(21 missing values generated)

.         egen meanmil  =mean(lnl12milaid),by(gwf_casename)

.         egen meanecon  =mean(lnl12econaid),by(gwf_casename)

.         egen meanpers = mean(pers),by(gwf_casename)

. 
.         replace meanecon = meanecon/4
(1,349 real changes made)

.         replace meanmil = meanmil/4
(782 real changes made)

.         egen ctag = tag(gwf_casename)

.         ttest meanpers if ctag==1, by(maxcase)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |      80    .2374059    .0294872    .2637415    .1787131    .2960987
       1 |      19    .3191992    .0629903    .2745685    .1868615     .451537
---------+--------------------------------------------------------------------
combined |      99    .2531037    .0267741     .266399    .1999713     .306236
---------+--------------------------------------------------------------------
    diff |           -.0817933    .0678304               -.2164179    .0528313
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -1.2058
Ho: diff = 0                                     degrees of freedom =       97

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1154         Pr(|T| > |t|) = 0.2308          Pr(T > t) = 0.8846

.         krls maxcase meanpers meanpop meangdp america if ctag==1 
Iteration =  1, Looloss: 37.06829  
Iteration =  2, Looloss: 36.72902  
Iteration =  3, Looloss: 36.29616  
Iteration =  4, Looloss: 35.80253  
Iteration =  5, Looloss: 35.32393  
Iteration =  6, Looloss: 34.96334  
Iteration =  7, Looloss: 34.97154  

Pointwise Derivatives                                  Number of obs =       95
>  
                                                       Lambda        =    2.873
>  
                                                       Tolerance     =     .095
>  
                                                       Sigma         =        4
>  
                                                       Eff. df       =    9.991
>  
                                                       R2            =    .2825
>  
                                                       Looloss       =    34.82

  maxcase |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
----------+--------------------------------------------------------------------
 meanpers |   .21646   .077152    2.806    0.006    .070138   .191988   .314874
>   
  meanpop |  .060393   .016873    3.579    0.001    .014303   .053515   .085622
>   
  meangdp |   .05269   .022199    2.374    0.020    .015806   .044971   .095756
>   
*americas |   .03661   .077603    0.472    0.638   -.050177   .036916   .101169
>   
----------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.         est store m1

.         krls maxcase meanpers meanpop meangdp regnoc meanoil america if ctag=
> =1 
Iteration =  1, Looloss: 36.78633  
Iteration =  2, Looloss: 36.31755  
Iteration =  3, Looloss: 35.73107  
Iteration =  4, Looloss: 35.07497  
Iteration =  5, Looloss: 34.43481  
Iteration =  6, Looloss: 33.90262  
Iteration =  7, Looloss: 33.53991  
Iteration =  8, Looloss: 33.41044  
Iteration =  9, Looloss: 33.42061  

Pointwise Derivatives                                  Number of obs =       95
>  
                                                       Lambda        =    1.594
>  
                                                       Tolerance     =     .095
>  
                                                       Sigma         =        6
>  
                                                       Eff. df       =    16.14
>  
                                                       R2            =    .4135
>  
                                                       Looloss       =    33.36

  maxcase |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
----------+--------------------------------------------------------------------
 meanpers |  .173225   .080877    2.142    0.035     .02437   .140169   .290258
>   
  meanpop |  .074414    .01613    4.614    0.000    .025093   .082185   .122966
>   
  meangdp |  .053598   .021691    2.471    0.015    .019983   .056349   .085721
>   
  *regnoc |  .123989   .071149    1.743    0.085    .052204   .153123   .213795
>   
  meanoil |  .006167   .009489    0.650    0.517   -.008651   .003434   .020744
>   
*americas |  .056805   .072322    0.785    0.434   -.006185   .047288    .11642
>   
----------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.         est store m2

.         krls maxcase meanpers meanpop meangdp regnoc meanoil meanecon meanmil
>  america if ctag==1,deriv(m3)
Iteration =  1, Looloss: 36.76055  
Iteration =  2, Looloss: 36.20564  
Iteration =  3, Looloss: 35.42877  
Iteration =  4, Looloss: 34.42128  
Iteration =  5, Looloss: 33.24005  
Iteration =  6, Looloss: 32.01855  
Iteration =  7, Looloss: 30.9341   
Iteration =  8, Looloss: 30.14103  
Iteration =  9, Looloss: 29.71425  
Iteration = 10, Looloss: 29.86534  

Pointwise Derivatives                                  Number of obs =       95
>  
                                                       Lambda        =    .9238
>  
                                                       Tolerance     =     .095
>  
                                                       Sigma         =        8
>  
                                                       Eff. df       =    24.76
>  
                                                       R2            =    .6034
>  
                                                       Looloss       =    29.63

  maxcase |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
----------+--------------------------------------------------------------------
 meanpers |   .15985   .073099    2.187    0.031    .014378   .151826   .284442
>   
  meanpop |  .081063   .014271    5.680    0.000    .040676   .083035   .122474
>   
  meangdp |  .064649   .018107    3.570    0.001     .02263   .062928    .09667
>   
  *regnoc |  .113491   .059519    1.907    0.060    .027996    .10763   .220841
>   
  meanoil |  .026933     .0083    3.245    0.002    .010924   .026002   .039352
>   
 meanecon |  .038065   .011523    3.303    0.001    .014965   .029727   .055731
>   
  meanmil |  .022879   .010331    2.215    0.029   -.009906   .020338   .056426
>   
*americas |  .009016    .06056    0.149    0.882   -.037397   .019765   .063114
>   
----------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.         est store m3

.                                 global color1="gs1"

.                                 global color2="gs8"

.                                 global color3="gs12"

. 
.                                 global vars = 1 /* number of variables we wan
> t to not display */

.                                 gen count=_n

.                                 gen name = ""
(1,373 missing values generated)

.                                 forval m = 1/3 {
  2.                                         gen hi`m' =.
  3.                                         gen lo`m' =.
  4.                                         gen mhi`m'  =.
  5.                                         gen mlo`m' =.
  6.                                         gen b`m' =.
  7.                                         gen v`m'=.                        
>       /* number of variables we want to display */
  8.                                         qui:est restore m`m' 
  9.                                         matrix O =  e(Output)
 10.                                         scalar r = rowsof(O)
 11.                                         local r =  r
 12.                                         replace v`m'=r- $vars
 13.                                         forval c = 1/`r'  {
 14.                                                 local d1 = `c'+4+ 2*`m' 
 15.                                                 local d = `c'
 16.                                                 if `c'> v`m' {
 17.                                                         local d =`d1'
 18.                                                 }
 19.                                                 local rownms: rown O 
 20.                                                 local rowname: word `c' of
>  `rownms'
 21.                                                 replace name = "`rowname'"
>  if count==`d'
 22.                                                 local beta = O[`c',1]
 23.                                                 local var = O[`c',2]
 24.                                                 matrix d==(0,0,0,0,0\0,0,0
> ,0,0)
 25.                                                 matrix d[1,3]=  `beta'
 26.                                                 matrix d[1,5] =  `beta' + 
> 1.96*`var'
 27.                                                 matrix d[1,1] =  `beta' - 
> 1.96*`var'
 28.                                                 matrix d[1,4] =  `beta' + 
> 1.65*`var'
 29.                                                 matrix d[1,2] =  `beta' - 
> 1.65*`var'
 30.                                                 qui replace hi`m'    =  d[
> 1,5] if count==`d'
 31.                                                 qui replace lo`m'    =  d[
> 1,1] if count==`d'
 32.                                                 qui replace mhi`m'    =  d
> [1,4] if count==`d'
 33.                                                 qui replace mlo`m'    =  d
> [1,2] if count==`d'
 34.                                                 qui replace b`m'  =  d[1,3
> ] if count==`d'
 35.                                         }
 36.                                         sum name hi`m'  lo`m'  b`m' v`m' c
> ount
 37.                                 }
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 real changes made)
variable name was str1 now str8
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        name |          0
         hi1 |          4     .186514    .1286345   .0934642   .3676791
         lo1 |          4   -.0034373    .0782698  -.1154925   .0652417
          b1 |          4    .0915384    .0838687   .0366101   .2164604
          v1 |      1,373           3           0          3          3
-------------+---------------------------------------------------------
       count |      1,373         687    396.4953          1       1373
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        name |          0
         hi2 |          6     .170108    .1151978   .0247655   .3317435
         lo2 |          6    -.007375    .0434837  -.0849463   .0428001
          b2 |          6    .0813665    .0588766   .0061673    .173225
          v2 |      1,373           5           0          5          5
-------------+---------------------------------------------------------
       count |      1,373         687    396.4953          1       1373
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        name |          0
         hi3 |          8    .1271423    .0934754   .0431268   .3031252
         lo3 |          8    .0018444    .0482805  -.1096823   .0530909
          b3 |          8    .0644933     .051668   .0090161   .1598503
          v3 |      1,373           7           0          7          7
-------------+---------------------------------------------------------
       count |      1,373         687    396.4953          1       1373

.                                 gen count1=(count*-1)+8

.                                 gen count2=count1-.333

.                                 gen count3=count2-.333

.                                 twoway (scatter count1 b1 if count>=1 & count
> <=7,ylab(1(1)7,glcolor(gs16)) xlab(0(.1).3) mcolor($color1) msymbol(T) yscale
> (range(0.75 7.25)) ///
>                                 xtitle(Estimate) xline(0,lpat(dash))) (rspike
>  hi1 lo1 count1 if count>=1 &count<=7, horizontal ytitle("") title(Cross-sect
> ional,size(medium)) ///
>                                 ylab(6.67 "{bf:Personalism}" 5.67 "GDP pc" 4.
> 67 "Population" 3.67 "Oil rents" 2.67 "Regulatory NOC" 1.67 "Economic aid" 0.
> 67 "Military aid") ///
>                                 lcolor($color1) lwidth(medthin) legend(lab(1 
> "base model") lab(4 "add oil") lab(7 "add aid") order(1 4 7) col(3) pos(6) ri
> ng(.5)))              ///
>                                 (rspike mhi1 mlo1 count1 if count>=1 &count<=
> 7, lwidth(thick) lcolor($color1) horizontal saving(h1.gph,replace))  ///
>                                 ///
>                                 (scatter count2 b2 if count>=1 & count<=7,mco
> lor($color2) msymbol(S)) ///
>                                 (rspike hi2 lo2 count2 if count>=1 &count<=7,
>  horizontal lcolor($color2) lwidth(medthin)) ///
>                                 (rspike mhi2 mlo2 count2 if count>=1 &count<=
> 7, horizontal lcolor($color2) lwidth(thick)) ///
>                                 ///
>                                 (scatter count3 b3 if count>=1 & count<=7,mco
> lor($color3) msymbol(plus) msize(vlarge)) ///
>                                 (rspike hi3 lo3 count3 if count>=1 &count<=7,
>  horizontal lcolor($color3) lwidth(medthin)) ///
>                                 (rspike mhi3 mlo3 count3 if count>=1 &count<=
> 7, horizontal lcolor($color3) lwidth(thick) ///
>                                 yline(6.165,lpat(solid)lcol(gs15)) yline(5.16
> 5,lpat(solid)lcol(gs15)) yline(4.165,lpat(solid)lcol(gs15))  ///
>                                 yline(3.165,lpat(solid)lcol(gs15)) yline(2.16
> 5,lpat(solid)lcol(gs15)) yline(1.165,lpat(solid)lcol(gs15)))
(file h1.gph saved)

.                                 drop name hi* lo* b* count* mhi* mlo* v1 v2 v
> 3

.  
. **************************
. ** RE Logits, time-vary **
. **************************
.         replace lnl12econ = lnl12econ/4
(1,109 real changes made)

.         replace lnl12mil = lnl12mil/4
(556 real changes made)

.         gen yr = year

.         replace yr = 2005 if yr==2001 | yr==1997 | yr==2003 | yr==2004 | yr==
> 1982 | yr==1983
(260 real changes made)

.         xi:xtlogit case i.yr lpop lgdpcap pers   america asia easia ssa meast
>  if yr>1980,vce(cluster cow)
i.yr              _Iyr_1979-2010      (naturally coded; _Iyr_1979 omitted)
note: _Iyr_1981 != 0 predicts failure perfectly
      _Iyr_1981 dropped and 33 obs not used

note: _Iyr_1984 != 0 predicts failure perfectly
      _Iyr_1984 dropped and 36 obs not used

note: _Iyr_1985 != 0 predicts failure perfectly
      _Iyr_1985 dropped and 37 obs not used

note: _Iyr_1986 != 0 predicts failure perfectly
      _Iyr_1986 dropped and 36 obs not used

note: _Iyr_1987 != 0 predicts failure perfectly
      _Iyr_1987 dropped and 37 obs not used

note: _Iyr_1988 != 0 predicts failure perfectly
      _Iyr_1988 dropped and 37 obs not used

note: _Iyr_1989 != 0 predicts failure perfectly
      _Iyr_1989 dropped and 37 obs not used

note: _Iyr_1990 != 0 predicts failure perfectly
      _Iyr_1990 dropped and 37 obs not used

note: _Iyr_1991 != 0 predicts failure perfectly
      _Iyr_1991 dropped and 37 obs not used

note: _Iyr_1992 != 0 predicts failure perfectly
      _Iyr_1992 dropped and 43 obs not used

note: _Iyr_1993 != 0 predicts failure perfectly
      _Iyr_1993 dropped and 43 obs not used

note: _Iyr_1994 != 0 predicts failure perfectly
      _Iyr_1994 dropped and 42 obs not used

note: _Iyr_1995 != 0 predicts failure perfectly
      _Iyr_1995 dropped and 44 obs not used

note: _Iyr_1996 != 0 predicts failure perfectly
      _Iyr_1996 dropped and 44 obs not used

note: _Iyr_1998 != 0 predicts failure perfectly
      _Iyr_1998 dropped and 44 obs not used

note: _Iyr_1999 != 0 predicts failure perfectly
      _Iyr_1999 dropped and 45 obs not used

note: _Iyr_2000 != 0 predicts failure perfectly
      _Iyr_2000 dropped and 45 obs not used

note: _Iyr_2002 != 0 predicts failure perfectly
      _Iyr_2002 dropped and 45 obs not used

note: _Iyr_2006 != 0 predicts failure perfectly
      _Iyr_2006 dropped and 44 obs not used

note: _Iyr_1980 omitted because of collinearity
note: _Iyr_2010 omitted because of collinearity

Fitting comparison model:

Iteration 0:   log pseudolikelihood = -118.80702  
Iteration 1:   log pseudolikelihood =  -97.72297  
Iteration 2:   log pseudolikelihood = -86.048281  
Iteration 3:   log pseudolikelihood =  -85.55067  
Iteration 4:   log pseudolikelihood = -85.548197  
Iteration 5:   log pseudolikelihood = -85.548196  

Fitting full model:

tau =  0.0     log pseudolikelihood = -85.548196
tau =  0.1     log pseudolikelihood = -84.437441
tau =  0.2     log pseudolikelihood =  -83.44631
tau =  0.3     log pseudolikelihood = -82.616076
tau =  0.4     log pseudolikelihood = -81.993522
tau =  0.5     log pseudolikelihood = -81.647919
tau =  0.6     log pseudolikelihood = -81.699989

Iteration 0:   log pseudolikelihood = -81.647601  
Iteration 1:   log pseudolikelihood = -79.498569  
Iteration 2:   log pseudolikelihood = -79.148014  
Iteration 3:   log pseudolikelihood = -79.144963  
Iteration 4:   log pseudolikelihood = -79.144963  

Calculating robust standard errors:

Random-effects logistic regression              Number of obs     =        461
Group variable: cowcode                         Number of groups  =         47

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =        9.8
                                                              max =         11

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(12)     =      57.09
Log pseudolikelihood  = -79.144963              Prob > chi2       =     0.0000

                               (Std. Err. adjusted for 47 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
        case |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   _Iyr_1980 |          0  (omitted)
   _Iyr_1981 |          0  (omitted)
   _Iyr_1984 |          0  (omitted)
   _Iyr_1985 |          0  (omitted)
   _Iyr_1986 |          0  (omitted)
   _Iyr_1987 |          0  (omitted)
   _Iyr_1988 |          0  (omitted)
   _Iyr_1989 |          0  (omitted)
   _Iyr_1990 |          0  (omitted)
   _Iyr_1991 |          0  (omitted)
   _Iyr_1992 |          0  (omitted)
   _Iyr_1993 |          0  (omitted)
   _Iyr_1994 |          0  (omitted)
   _Iyr_1995 |          0  (omitted)
   _Iyr_1996 |          0  (omitted)
   _Iyr_1998 |          0  (omitted)
   _Iyr_1999 |          0  (omitted)
   _Iyr_2000 |          0  (omitted)
   _Iyr_2002 |          0  (omitted)
   _Iyr_2005 |  -2.322946   .5526761    -4.20   0.000    -3.406171   -1.239721
   _Iyr_2006 |          0  (omitted)
   _Iyr_2007 |  -.2858266   .7955581    -0.36   0.719    -1.845092    1.273439
   _Iyr_2008 |  -1.097754   .8354696    -1.31   0.189    -2.735245    .5397361
   _Iyr_2009 |   .1328565   .8122243     0.16   0.870    -1.459074    1.724787
   _Iyr_2010 |          0  (omitted)
        lpop |   1.357265   .5520628     2.46   0.014     .2752415    2.439288
     lgdpcap |   1.630856   .6387122     2.55   0.011     .3790029    2.882709
        pers |   3.899877   1.689013     2.31   0.021     .5894727    7.210281
    americas |   1.531305   1.914846     0.80   0.424    -2.221725    5.284334
        asia |   .6726177   1.873586     0.36   0.720    -2.999544    4.344779
       easia |   .6509284    1.93411     0.34   0.736    -3.139857    4.441714
         ssa |   2.011644   2.314073     0.87   0.385    -2.523857    6.547144
       meast |  -1.934814   1.841197    -1.05   0.293    -5.543495    1.673866
       _cons |  -40.60028   15.25209    -2.66   0.008    -70.49383   -10.70674
-------------+----------------------------------------------------------------
    /lnsig2u |   1.042329   .5519623                     -.0394976    2.124155
-------------+----------------------------------------------------------------
     sigma_u |   1.683987   .4647487                       .980445    2.892373
         rho |   .4629384   .1372324                       .226121    .7177458
------------------------------------------------------------------------------

.         est store l1

.         xi:xtlogit case i.yr lpop lgdpcap pers oilpc regnoc america asia easi
> a ssa meast if yr>1980,vce(cluster cow)
i.yr              _Iyr_1979-2010      (naturally coded; _Iyr_1979 omitted)
note: _Iyr_1981 != 0 predicts failure perfectly
      _Iyr_1981 dropped and 33 obs not used

note: _Iyr_1984 != 0 predicts failure perfectly
      _Iyr_1984 dropped and 36 obs not used

note: _Iyr_1985 != 0 predicts failure perfectly
      _Iyr_1985 dropped and 37 obs not used

note: _Iyr_1986 != 0 predicts failure perfectly
      _Iyr_1986 dropped and 36 obs not used

note: _Iyr_1987 != 0 predicts failure perfectly
      _Iyr_1987 dropped and 37 obs not used

note: _Iyr_1988 != 0 predicts failure perfectly
      _Iyr_1988 dropped and 37 obs not used

note: _Iyr_1989 != 0 predicts failure perfectly
      _Iyr_1989 dropped and 37 obs not used

note: _Iyr_1990 != 0 predicts failure perfectly
      _Iyr_1990 dropped and 37 obs not used

note: _Iyr_1991 != 0 predicts failure perfectly
      _Iyr_1991 dropped and 37 obs not used

note: _Iyr_1992 != 0 predicts failure perfectly
      _Iyr_1992 dropped and 43 obs not used

note: _Iyr_1993 != 0 predicts failure perfectly
      _Iyr_1993 dropped and 43 obs not used

note: _Iyr_1994 != 0 predicts failure perfectly
      _Iyr_1994 dropped and 42 obs not used

note: _Iyr_1995 != 0 predicts failure perfectly
      _Iyr_1995 dropped and 44 obs not used

note: _Iyr_1996 != 0 predicts failure perfectly
      _Iyr_1996 dropped and 44 obs not used

note: _Iyr_1998 != 0 predicts failure perfectly
      _Iyr_1998 dropped and 44 obs not used

note: _Iyr_1999 != 0 predicts failure perfectly
      _Iyr_1999 dropped and 45 obs not used

note: _Iyr_2000 != 0 predicts failure perfectly
      _Iyr_2000 dropped and 45 obs not used

note: _Iyr_2002 != 0 predicts failure perfectly
      _Iyr_2002 dropped and 45 obs not used

note: _Iyr_2006 != 0 predicts failure perfectly
      _Iyr_2006 dropped and 44 obs not used

note: _Iyr_1980 omitted because of collinearity
note: _Iyr_2010 omitted because of collinearity

Fitting comparison model:

Iteration 0:   log pseudolikelihood = -118.80702  
Iteration 1:   log pseudolikelihood =  -92.61084  
Iteration 2:   log pseudolikelihood = -74.552766  
Iteration 3:   log pseudolikelihood = -71.349997  
Iteration 4:   log pseudolikelihood = -71.213146  
Iteration 5:   log pseudolikelihood = -71.212485  
Iteration 6:   log pseudolikelihood = -71.212485  

Fitting full model:

tau =  0.0     log pseudolikelihood = -71.212485
tau =  0.1     log pseudolikelihood = -71.073129
tau =  0.2     log pseudolikelihood = -71.042275
tau =  0.3     log pseudolikelihood = -71.140375

Iteration 0:   log pseudolikelihood = -71.042275  
Iteration 1:   log pseudolikelihood = -70.814241  
Iteration 2:   log pseudolikelihood = -70.783957  
Iteration 3:   log pseudolikelihood = -70.783916  
Iteration 4:   log pseudolikelihood = -70.783916  

Calculating robust standard errors:

Random-effects logistic regression              Number of obs     =        461
Group variable: cowcode                         Number of groups  =         47

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =        9.8
                                                              max =         11

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(14)     =     143.57
Log pseudolikelihood  = -70.783916              Prob > chi2       =     0.0000

                               (Std. Err. adjusted for 47 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
        case |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   _Iyr_1980 |          0  (omitted)
   _Iyr_1981 |          0  (omitted)
   _Iyr_1984 |          0  (omitted)
   _Iyr_1985 |          0  (omitted)
   _Iyr_1986 |          0  (omitted)
   _Iyr_1987 |          0  (omitted)
   _Iyr_1988 |          0  (omitted)
   _Iyr_1989 |          0  (omitted)
   _Iyr_1990 |          0  (omitted)
   _Iyr_1991 |          0  (omitted)
   _Iyr_1992 |          0  (omitted)
   _Iyr_1993 |          0  (omitted)
   _Iyr_1994 |          0  (omitted)
   _Iyr_1995 |          0  (omitted)
   _Iyr_1996 |          0  (omitted)
   _Iyr_1998 |          0  (omitted)
   _Iyr_1999 |          0  (omitted)
   _Iyr_2000 |          0  (omitted)
   _Iyr_2002 |          0  (omitted)
   _Iyr_2005 |  -2.245715   .5946449    -3.78   0.000    -3.411198   -1.080233
   _Iyr_2006 |          0  (omitted)
   _Iyr_2007 |  -.6867303   .7229976    -0.95   0.342     -2.10378     .730319
   _Iyr_2008 |  -1.489549   .8060706    -1.85   0.065    -3.069418    .0903202
   _Iyr_2009 |  -.6044179   .7377371    -0.82   0.413    -2.050356    .8415203
   _Iyr_2010 |          0  (omitted)
        lpop |   1.553786   .4542287     3.42   0.001     .6635137    2.444057
     lgdpcap |   .4001894   .4575836     0.87   0.382     -.496658    1.297037
        pers |    2.80332    1.51866     1.85   0.065    -.1731998     5.77984
       oilpc |   1.132957   .3366974     3.36   0.001     .4730422    1.792872
      regnoc |   1.322775   .8248325     1.60   0.109    -.2938675    2.939417
    americas |    2.80211   2.055188     1.36   0.173    -1.225984    6.830204
        asia |   .9300325     2.0192     0.46   0.645    -3.027527    4.887592
       easia |   .9838023   2.168234     0.45   0.650    -3.265857    5.233462
         ssa |   1.960583   2.265427     0.87   0.387    -2.479573    6.400738
       meast |  -1.733957   2.059942    -0.84   0.400    -5.771368    2.303455
       _cons |  -41.54378   11.84633    -3.51   0.000    -64.76217   -18.32539
-------------+----------------------------------------------------------------
    /lnsig2u |  -.5714924   1.223873                      -2.97024    1.827255
-------------+----------------------------------------------------------------
     sigma_u |   .7514533   .4598419                      .2264751    2.493351
         rho |   .1464975   .1530282                      .0153513     .653941
------------------------------------------------------------------------------

.         est store l2

.         xi:xtlogit case i.yr lpop lgdpcap pers oilpc regnoc lnl12* america as
> ia easia ssa meast if yr>1980,vce(cluster cow)
i.yr              _Iyr_1979-2010      (naturally coded; _Iyr_1979 omitted)
note: _Iyr_1981 != 0 predicts failure perfectly
      _Iyr_1981 dropped and 33 obs not used

note: _Iyr_1984 != 0 predicts failure perfectly
      _Iyr_1984 dropped and 36 obs not used

note: _Iyr_1985 != 0 predicts failure perfectly
      _Iyr_1985 dropped and 37 obs not used

note: _Iyr_1986 != 0 predicts failure perfectly
      _Iyr_1986 dropped and 36 obs not used

note: _Iyr_1987 != 0 predicts failure perfectly
      _Iyr_1987 dropped and 37 obs not used

note: _Iyr_1988 != 0 predicts failure perfectly
      _Iyr_1988 dropped and 37 obs not used

note: _Iyr_1989 != 0 predicts failure perfectly
      _Iyr_1989 dropped and 37 obs not used

note: _Iyr_1990 != 0 predicts failure perfectly
      _Iyr_1990 dropped and 37 obs not used

note: _Iyr_1991 != 0 predicts failure perfectly
      _Iyr_1991 dropped and 37 obs not used

note: _Iyr_1992 != 0 predicts failure perfectly
      _Iyr_1992 dropped and 43 obs not used

note: _Iyr_1993 != 0 predicts failure perfectly
      _Iyr_1993 dropped and 43 obs not used

note: _Iyr_1994 != 0 predicts failure perfectly
      _Iyr_1994 dropped and 42 obs not used

note: _Iyr_1995 != 0 predicts failure perfectly
      _Iyr_1995 dropped and 44 obs not used

note: _Iyr_1996 != 0 predicts failure perfectly
      _Iyr_1996 dropped and 44 obs not used

note: _Iyr_1998 != 0 predicts failure perfectly
      _Iyr_1998 dropped and 44 obs not used

note: _Iyr_1999 != 0 predicts failure perfectly
      _Iyr_1999 dropped and 45 obs not used

note: _Iyr_2000 != 0 predicts failure perfectly
      _Iyr_2000 dropped and 45 obs not used

note: _Iyr_2002 != 0 predicts failure perfectly
      _Iyr_2002 dropped and 45 obs not used

note: _Iyr_2006 != 0 predicts failure perfectly
      _Iyr_2006 dropped and 44 obs not used

note: _Iyr_1980 omitted because of collinearity
note: _Iyr_2010 omitted because of collinearity

Fitting comparison model:

Iteration 0:   log pseudolikelihood = -118.80702  
Iteration 1:   log pseudolikelihood = -92.456942  
Iteration 2:   log pseudolikelihood = -74.132805  
Iteration 3:   log pseudolikelihood = -70.832477  
Iteration 4:   log pseudolikelihood = -70.673026  
Iteration 5:   log pseudolikelihood = -70.672385  
Iteration 6:   log pseudolikelihood = -70.672385  

Fitting full model:

tau =  0.0     log pseudolikelihood = -70.672385
tau =  0.1     log pseudolikelihood = -70.536927
tau =  0.2     log pseudolikelihood = -70.498018
tau =  0.3     log pseudolikelihood = -70.576205

Iteration 0:   log pseudolikelihood = -70.498018  
Iteration 1:   log pseudolikelihood = -70.329387  
Iteration 2:   log pseudolikelihood = -70.202912  
Iteration 3:   log pseudolikelihood = -70.201087  
Iteration 4:   log pseudolikelihood =  -70.20108  

Calculating robust standard errors:

Random-effects logistic regression              Number of obs     =        461
Group variable: cowcode                         Number of groups  =         47

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =        9.8
                                                              max =         11

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(16)     =     220.06
Log pseudolikelihood  =  -70.20108              Prob > chi2       =     0.0000

                               (Std. Err. adjusted for 47 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
        case |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   _Iyr_1980 |          0  (omitted)
   _Iyr_1981 |          0  (omitted)
   _Iyr_1984 |          0  (omitted)
   _Iyr_1985 |          0  (omitted)
   _Iyr_1986 |          0  (omitted)
   _Iyr_1987 |          0  (omitted)
   _Iyr_1988 |          0  (omitted)
   _Iyr_1989 |          0  (omitted)
   _Iyr_1990 |          0  (omitted)
   _Iyr_1991 |          0  (omitted)
   _Iyr_1992 |          0  (omitted)
   _Iyr_1993 |          0  (omitted)
   _Iyr_1994 |          0  (omitted)
   _Iyr_1995 |          0  (omitted)
   _Iyr_1996 |          0  (omitted)
   _Iyr_1998 |          0  (omitted)
   _Iyr_1999 |          0  (omitted)
   _Iyr_2000 |          0  (omitted)
   _Iyr_2002 |          0  (omitted)
   _Iyr_2005 |  -2.052306   .6029881    -3.40   0.001    -3.234141   -.8704713
   _Iyr_2006 |          0  (omitted)
   _Iyr_2007 |  -.6989037   .7441156    -0.94   0.348    -2.157343    .7595361
   _Iyr_2008 |  -1.516298   .8286065    -1.83   0.067    -3.140337    .1077408
   _Iyr_2009 |   -.638044    .763661    -0.84   0.403    -2.134792     .858704
   _Iyr_2010 |          0  (omitted)
        lpop |   1.500159   .4102606     3.66   0.000     .6960634    2.304255
     lgdpcap |   .4954081   .4977044     1.00   0.320    -.4800746    1.470891
        pers |   2.763065   1.551327     1.78   0.075    -.2774807    5.803611
       oilpc |   1.132037   .3150406     3.59   0.000     .5145687    1.749505
      regnoc |   1.359365   .8476325     1.60   0.109    -.3019646    3.020694
 lnl12milaid |  -.0172248   .1575328    -0.11   0.913    -.3259834    .2915338
lnl12econaid |    .477819   .3504596     1.36   0.173    -.2090692    1.164707
    americas |   3.039127   2.348282     1.29   0.196    -1.563421    7.641675
        asia |   1.235463   2.260226     0.55   0.585    -3.194497    5.665424
       easia |   1.258437   2.470079     0.51   0.610    -3.582828    6.099702
         ssa |   2.290886    2.55956     0.90   0.371    -2.725759    7.307532
       meast |  -1.246616    2.33132    -0.53   0.593    -5.815919    3.322688
       _cons |  -43.78665   11.87997    -3.69   0.000    -67.07096   -20.50234
-------------+----------------------------------------------------------------
    /lnsig2u |  -.4567899   1.195408                     -2.799747    1.886167
-------------+----------------------------------------------------------------
     sigma_u |   .7958099   .4756588                      .2466282    2.567887
         rho |   .1614285   .1618216                      .0181531    .6671492
------------------------------------------------------------------------------

.         est store l3

.         label var lgdpcap "GDP pc (log)"

.         label var lpop "Pop (log)"

.         label var oilpc "Oil pc (log)"

.         label var pers "{bf:Personalism}"

.         label var regnoc "Reg NOC"

.         label var lnl12mil  "Military aid"

.         label var lnl12econ  "Economic aid"

.         coefplot (l1, msymbol(T) mcol($color1) ciopts(lpat(solid) lcol($color
> 1 $color1)) ) (l2, msymbol(S) mcol($color2) ciopts(lpat(solid) lcol($color2 $
> color2)) ) /*
>                 */ (l3, msymbol(plus)mcol($color3) ciopts(lpat(solid) lcol($c
> olor3 $color3)) ), title("RE logit", size(medsmall) height(5))/*
>                 */ scheme(lean2) drop(_cons _Iy* americas asia easia ssa meas
> t) order (pers lpop lgdpcap oilpc regnoc lnl12econ lnl12mil) /*
>                 */ xlab(0 (2) 8) xline(0, lpattern(dash)) grid(glcolor(gs15))
>  mfcolor(white) /*
>                 */ ysize(2) xsize(2.5)   /*
>                 */ legend(label(3 "base model") label(6 "add oil") label(9 "a
> dd aid") size(small) pos(6) ring(1.5) col(3))  /*
>                 */ levels(95 90) xtitle("  Coefficient estimate", height(6)si
> ze(small))

.         graph export "$dir\golden\Corruption-RElogit.pdf", as(pdf)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Corruption-RElogit.pdf written in PDF format)

.          xtlogit case period* lpop lgdp pers oilpc regnoc america asia easia 
> ssa meast,vce(cluster cow)
note: period6 != 0 predicts failure perfectly
      period6 dropped and 55 obs not used

note: period8 != 0 predicts failure perfectly
      period8 dropped and 136 obs not used

note: period9 != 0 predicts failure perfectly
      period9 dropped and 146 obs not used

note: period1 omitted because of collinearity
note: period2 omitted because of collinearity
note: period3 omitted because of collinearity
note: period4 omitted because of collinearity
note: period5 omitted because of collinearity
note: period12 omitted because of collinearity

Fitting comparison model:

Iteration 0:   log pseudolikelihood = -94.133587  
Iteration 1:   log pseudolikelihood = -87.952888  
Iteration 2:   log pseudolikelihood = -61.893287  
Iteration 3:   log pseudolikelihood = -58.562557  
Iteration 4:   log pseudolikelihood = -58.251627  
Iteration 5:   log pseudolikelihood = -58.249692  
Iteration 6:   log pseudolikelihood = -58.249692  

Fitting full model:

tau =  0.0     log pseudolikelihood = -58.249692
tau =  0.1     log pseudolikelihood = -58.462347

Iteration 0:   log pseudolikelihood = -58.462347  
Iteration 1:   log pseudolikelihood = -58.269254  
Iteration 2:   log pseudolikelihood = -58.253652  
Iteration 3:   log pseudolikelihood = -58.250403  
Iteration 4:   log pseudolikelihood = -58.249857  
Iteration 5:   log pseudolikelihood = -58.249729  
Iteration 6:   log pseudolikelihood = -58.249699  
Iteration 7:   log pseudolikelihood = -58.249699  

Calculating robust standard errors:

Random-effects logistic regression              Number of obs     =        595
Group variable: cowcode                         Number of groups  =         43

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       13.8
                                                              max =         20

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(13)     =     177.09
Log pseudolikelihood  = -58.249699              Prob > chi2       =     0.0000

                               (Std. Err. adjusted for 43 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
        case |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     period1 |          0  (omitted)
     period2 |          0  (omitted)
     period3 |          0  (omitted)
     period4 |          0  (omitted)
     period5 |          0  (omitted)
     period6 |          0  (omitted)
     period7 |  -2.422173   .9011176    -2.69   0.007    -4.188331   -.6560148
     period8 |          0  (omitted)
     period9 |          0  (omitted)
    period10 |  -1.383078   .9832638    -1.41   0.160     -3.31024    .5440832
    period11 |  -.7565936   .5165842    -1.46   0.143     -1.76908    .2558928
    period12 |          0  (omitted)
        lpop |   .5388374   .5356103     1.01   0.314    -.5109395    1.588614
        lgdp |   .4277855   .3336163     1.28   0.200    -.2260905    1.081661
        pers |   2.174603   1.834893     1.19   0.236    -1.421722    5.770928
       oilpc |   .9107311   .3150633     2.89   0.004     .2932184    1.528244
      regnoc |   1.258971   1.248433     1.01   0.313    -1.187913    3.705855
    americas |   3.094124   1.447268     2.14   0.033     .2575308    5.930717
        asia |     .80263   2.058998     0.39   0.697    -3.232931    4.838191
       easia |   .3269403   2.076372     0.16   0.875    -3.742675    4.396556
         ssa |   .4044177   2.250682     0.18   0.857    -4.006837    4.815673
       meast |  -1.727043   1.915489    -0.90   0.367    -5.481333    2.027247
       _cons |  -30.61925   11.08193    -2.76   0.006    -52.33943   -8.899072
-------------+----------------------------------------------------------------
    /lnsig2u |  -12.97124          .                             .           .
-------------+----------------------------------------------------------------
     sigma_u |   .0015252          .                             .           .
         rho |   7.07e-07          .                             .           .
------------------------------------------------------------------------------

.  
. ************************
. ** Conditional logits **
. ************************
.         gen time = year-1978

.         gen xlpop =lpop*10 
(3 missing values generated)

.         clogit case time xlpop lgdpcap pers if year>1980,group(cow)  
note: multiple positive outcomes within groups encountered.
note: 30 groups (782 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log likelihood = -54.105253  
Iteration 1:   log likelihood =  -48.82363  
Iteration 2:   log likelihood = -47.313485  
Iteration 3:   log likelihood = -47.209646  
Iteration 4:   log likelihood = -47.209164  
Iteration 5:   log likelihood = -47.209164  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =        445
                                                LR chi2(4)        =      87.88
                                                Prob > chi2       =     0.0000
Log likelihood = -47.209164                     Pseudo R2         =     0.4821

------------------------------------------------------------------------------
        case |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |  -.0211549   .1415854    -0.15   0.881    -.2986573    .2563474
       xlpop |   1.590392   .6471635     2.46   0.014     .3219751    2.858809
     lgdpcap |   3.398605   2.259313     1.50   0.133    -1.029567    7.826777
        pers |   3.237974   1.605701     2.02   0.044     .0908578     6.38509
------------------------------------------------------------------------------

.         est store cl1

.         clogit case time xlpop lgdpcap pers oilpc if year>1980,group(cow)
note: multiple positive outcomes within groups encountered.
note: 30 groups (782 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log likelihood = -53.164153  
Iteration 1:   log likelihood = -47.572095  
Iteration 2:   log likelihood = -45.334228  
Iteration 3:   log likelihood =  -45.16462  
Iteration 4:   log likelihood = -45.163402  
Iteration 5:   log likelihood = -45.163402  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =        445
                                                LR chi2(5)        =      91.97
                                                Prob > chi2       =     0.0000
Log likelihood = -45.163402                     Pseudo R2         =     0.5045

------------------------------------------------------------------------------
        case |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |  -.0850944   .1523872    -0.56   0.577    -.3837679     .213579
       xlpop |   1.869049   .7282976     2.57   0.010     .4416123    3.296486
     lgdpcap |   1.336906   2.478762     0.54   0.590    -3.521378     6.19519
        pers |   3.354162   1.684949     1.99   0.047      .051722    6.656602
       oilpc |   1.461694    .736771     1.98   0.047     .0176499    2.905739
------------------------------------------------------------------------------

.         est store cl2

.         clogit case time xlpop lgdpcap pers oilpc lnl12* if year>1980,group(c
> ow)   
note: multiple positive outcomes within groups encountered.
note: 30 groups (782 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log likelihood = -52.908808  
Iteration 1:   log likelihood = -47.128611  
Iteration 2:   log likelihood = -44.935325  
Iteration 3:   log likelihood = -44.748772  
Iteration 4:   log likelihood = -44.739131  
Iteration 5:   log likelihood = -44.739107  
Iteration 6:   log likelihood = -44.739107  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =        445
                                                LR chi2(7)        =      92.82
                                                Prob > chi2       =     0.0000
Log likelihood = -44.739107                     Pseudo R2         =     0.5092

------------------------------------------------------------------------------
        case |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |  -.1480801   .1842063    -0.80   0.421    -.5091179    .2129576
       xlpop |   2.031376   .8108121     2.51   0.012     .4422132    3.620538
     lgdpcap |   1.516918   2.797578     0.54   0.588    -3.966234     7.00007
        pers |   3.486734   1.835889     1.90   0.058    -.1115412    7.085009
       oilpc |    1.44105   .7358851     1.96   0.050    -.0012581    2.883358
 lnl12milaid |   .1224011   .4080961     0.30   0.764    -.6774526    .9222547
lnl12econaid |   .9954962   1.511754     0.66   0.510    -1.967488     3.95848
------------------------------------------------------------------------------

.         est store cl3

.         label var time "Time trend"

.         label var xlpop "Population"

.         coefplot (cl1, msymbol(T) mcol($color1) ciopts(lpat(solid) lcol($colo
> r1 $color1)) ) (cl2, msymbol(S) mcol($color2) ciopts(lpat(solid) lcol($color2
>  $color2)) ) /*
>                 */ (cl3, msymbol(plus)mcol($color3) ciopts(lpat(solid) lcol($
> color3 $color3)) ), title("Conditional logit", size(medsmall) height(5))/*
>                 */ scheme(lean2) drop(_cons _Iy* americas asia easia ssa meas
> t) order (pers time xlpop lgdpcap oilpc lnl12econ lnl12mil) /*
>                 */ xlab(-4 (2) 6) xline(0, lpattern(dash)) grid(glcolor(gs15)
> ) mfcolor(white) /*
>                 */ ysize(2) xsize(2.5)   /*
>                 */ legend(label(3 "base model") label(6 "add oil") label(9 "a
> dd aid") size(small) pos(6) ring(1.5) col(3))  /*
>                 */ levels(95 90) xtitle("  Coefficient estimate", height(6)si
> ze(small))

.         graph export "$dir\golden\Corruption-Clogit.pdf", as(pdf)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Corruption-Clogit.pdf written in PDF format)

.         
.         
. *****************
. ** Firth logit **
. *****************
. * post 1980 *
. firthlogit case regnoc lpop lgdpcap pers oilpc america asia easia ssa meast i
> f year>1978

initial:       penalized log likelihood = -142.05969
rescale:       penalized log likelihood = -142.05969
Iteration 0:   penalized log likelihood = -142.05969  
Iteration 1:   penalized log likelihood = -137.53924  (not concave)
Iteration 2:   penalized log likelihood = -107.88788  (not concave)
Iteration 3:   penalized log likelihood = -105.41858  (not concave)
Iteration 4:   penalized log likelihood = -101.23521  
Iteration 5:   penalized log likelihood = -98.010608  (not concave)
Iteration 6:   penalized log likelihood = -97.678005  
Iteration 7:   penalized log likelihood = -94.615606  
Iteration 8:   penalized log likelihood = -94.308744  
Iteration 9:   penalized log likelihood = -92.532855  
Iteration 10:  penalized log likelihood = -92.505083  
Iteration 11:  penalized log likelihood =  -92.48388  
Iteration 12:  penalized log likelihood = -92.462009  
Iteration 13:  penalized log likelihood = -92.461984  
Iteration 14:  penalized log likelihood = -92.461984  

                                                Number of obs     =      1,292
                                                Wald chi2(10)     =      53.01
Penalized log likelihood = -92.461984           Prob > chi2       =     0.0000

------------------------------------------------------------------------------
        case |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      regnoc |   .4322116   .5736467     0.75   0.451    -.6921153    1.556538
        lpop |   1.504686   .2713752     5.54   0.000     .9728009    2.036572
     lgdpcap |   .3713508    .339691     1.09   0.274    -.2944313    1.037133
        pers |   2.077672   1.120108     1.85   0.064     -.117699    4.273042
       oilpc |   1.423717   .2741774     5.19   0.000     .8863393    1.961095
    americas |   2.504018   1.052084     2.38   0.017     .4419709    4.566065
        asia |   2.551475   1.095613     2.33   0.020     .4041123    4.698838
       easia |   2.122916   1.150637     1.84   0.065    -.1322913    4.378123
         ssa |   3.139954   1.235635     2.54   0.011      .718153    5.561755
       meast |  -.7765269   1.063887    -0.73   0.465    -2.861707    1.308653
       _cons |  -44.14891   7.132859    -6.19   0.000    -58.12906   -30.16877
------------------------------------------------------------------------------

. * add reg NOC *
.  firthlogit case regnoc lpop lgdpcap pers oilpc america asia easia ssa meast 
> if  year>1978

initial:       penalized log likelihood = -142.05969
rescale:       penalized log likelihood = -142.05969
Iteration 0:   penalized log likelihood = -142.05969  
Iteration 1:   penalized log likelihood = -137.53924  (not concave)
Iteration 2:   penalized log likelihood = -107.88788  (not concave)
Iteration 3:   penalized log likelihood = -105.41858  (not concave)
Iteration 4:   penalized log likelihood = -101.23521  
Iteration 5:   penalized log likelihood = -98.010608  (not concave)
Iteration 6:   penalized log likelihood = -97.678005  
Iteration 7:   penalized log likelihood = -94.615606  
Iteration 8:   penalized log likelihood = -94.308744  
Iteration 9:   penalized log likelihood = -92.532855  
Iteration 10:  penalized log likelihood = -92.505083  
Iteration 11:  penalized log likelihood =  -92.48388  
Iteration 12:  penalized log likelihood = -92.462009  
Iteration 13:  penalized log likelihood = -92.461984  
Iteration 14:  penalized log likelihood = -92.461984  

                                                Number of obs     =      1,292
                                                Wald chi2(10)     =      53.01
Penalized log likelihood = -92.461984           Prob > chi2       =     0.0000

------------------------------------------------------------------------------
        case |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      regnoc |   .4322116   .5736467     0.75   0.451    -.6921153    1.556538
        lpop |   1.504686   .2713752     5.54   0.000     .9728009    2.036572
     lgdpcap |   .3713508    .339691     1.09   0.274    -.2944313    1.037133
        pers |   2.077672   1.120108     1.85   0.064     -.117699    4.273042
       oilpc |   1.423717   .2741774     5.19   0.000     .8863393    1.961095
    americas |   2.504018   1.052084     2.38   0.017     .4419709    4.566065
        asia |   2.551475   1.095613     2.33   0.020     .4041123    4.698838
       easia |   2.122916   1.150637     1.84   0.065    -.1322913    4.378123
         ssa |   3.139954   1.235635     2.54   0.011      .718153    5.561755
       meast |  -.7765269   1.063887    -0.73   0.465    -2.861707    1.308653
       _cons |  -44.14891   7.132859    -6.19   0.000    -58.12906   -30.16877
------------------------------------------------------------------------------

. 
. ********************
. ** KRLS time-vary **
. ********************
.          krls case pers lgdpcap lpop time america ssa meast asia easia if yea
> r>1996,deriv(k1) vcov
Iteration =  1, Looloss: 133.2624  
Iteration =  2, Looloss: 132.6571  
Iteration =  3, Looloss: 131.8141  
Iteration =  4, Looloss: 130.7069  
Iteration =  5, Looloss: 129.3559  
Iteration =  6, Looloss: 127.8389  
Iteration =  7, Looloss: 126.2691  
Iteration =  8, Looloss: 124.7528  
Iteration =  9, Looloss: 123.3585  
Iteration = 10, Looloss: 122.1134  
Iteration = 11, Looloss: 121.0217  
Iteration = 12, Looloss: 120.0913  
Iteration = 13, Looloss: 119.3502  
Iteration = 14, Looloss: 118.8413  

Pointwise Derivatives                                  Number of obs =      615
>  
                                                       Lambda        =    .5626
>  
                                                       Tolerance     =     .615
>  
                                                       Sigma         =        9
>  
                                                       Eff. df       =    57.05
>  
                                                       R2            =    .3262
>  
                                                       Looloss       =    118.6

     case |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
----------+--------------------------------------------------------------------
     pers |   .13219   .033659    3.927    0.000    .004501   .082546   .203668
>   
  lgdpcap |  .031479     .0103    3.056    0.002    .002016   .022807   .057209
>   
     lpop |   .03483   .007511    4.637    0.000    .005392   .022603   .055275
>   
     time |  .009567   .001757    5.445    0.000   -.002379   .006837   .020095
>   
*americas |  .027726   .022069    1.256    0.209   -.004052   .018733    .05315
>   
     *ssa |  .026574   .027912    0.952    0.341   -.022447   .012034   .069242
>   
   *meast | -.031955   .022103   -1.446    0.149   -.055767  -.019567   .002313
>   
    *asia |  .013678   .025612    0.534    0.594   -.010713   .023444   .045471
>   
   *easia | -.012019   .026251   -0.458    0.647   -.036878  -.007684   .030365
>   
----------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.         est store c1

.          krls case pers lgdpcap lpop oilpc regnoc time america ssa meast asia
>  easia if year>1996,deriv(k2) vcov
Iteration =  1, Looloss: 133.1461  
Iteration =  2, Looloss: 132.4484  
Iteration =  3, Looloss: 131.4487  
Iteration =  4, Looloss: 130.0943  
Iteration =  5, Looloss: 128.3861  
Iteration =  6, Looloss: 126.3995  
Iteration =  7, Looloss: 124.2644  
Iteration =  8, Looloss: 122.1174  
Iteration =  9, Looloss: 120.0731  
Iteration = 10, Looloss: 118.2267  
Iteration = 11, Looloss: 116.6565  
Iteration = 12, Looloss: 115.4221  
Iteration = 13, Looloss: 114.5635  

Pointwise Derivatives                                  Number of obs =      615
>  
                                                       Lambda        =    .6185
>  
                                                       Tolerance     =     .615
>  
                                                       Sigma         =       11
>  
                                                       Eff. df       =    66.33
>  
                                                       R2            =    .3679
>  
                                                       Looloss       =      114

     case |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
----------+--------------------------------------------------------------------
     pers |  .087402   .032924    2.655    0.008     .00114   .058439   .147804
>   
  lgdpcap |  .024383   .010776    2.263    0.024    .008646   .019679    .03787
>   
     lpop |  .033236   .006749    4.924    0.000    .010054   .027282    .05315
>   
    oilpc |  .008248   .005413    1.524    0.128   -.005664   .001669   .015869
>   
  *regnoc |  .042456   .024609    1.725    0.085   -.005948   .033258   .086127
>   
     time |  .008899   .001716    5.187    0.000    -.00291   .006519   .018259
>   
*americas |  .030528   .021236    1.438    0.151   -.016557   .019443   .060869
>   
     *ssa | -.000836   .024499   -0.034    0.973   -.026644  -.003252   .032786
>   
   *meast | -.046299   .022235   -2.082    0.038   -.070285  -.023373   .001585
>   
    *asia |  .001145   .025578    0.045    0.964   -.014906   .012111   .027862
>   
   *easia | -.028853   .025447   -1.134    0.257   -.052328  -.015865   .014294
>   
----------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.         est store c2

.          krls case pers lgdpcap lpop oilpc regnoc lnl12econ lnl12mil time ame
> rica ssa meast asia easia if year>1996,deriv(k3) vcov
Iteration =  1, Looloss: 133.2346  
Iteration =  2, Looloss: 132.5621  
Iteration =  3, Looloss: 131.5791  
Iteration =  4, Looloss: 130.2176  
Iteration =  5, Looloss: 128.4617  
Iteration =  6, Looloss: 126.3794  
Iteration =  7, Looloss: 124.1132  
Iteration =  8, Looloss: 121.8297  
Iteration =  9, Looloss: 119.6711  
Iteration = 10, Looloss: 117.7435  
Iteration = 11, Looloss: 116.1236  
Iteration = 12, Looloss: 114.872   
Iteration = 13, Looloss: 114.0432  

Pointwise Derivatives                                      Number of obs =     
>  615 
                                                           Lambda        =    .
> 8331 
                                                           Tolerance     =     
> .615 
                                                           Sigma         =     
>   13 
                                                           Eff. df       =    6
> 9.22 
                                                           R2            =    .
> 3579 
                                                           Looloss       =    1
> 13.7

         case |      Avg.       SE        t    P>|t|        P25       P50      
>  P75       
--------------+----------------------------------------------------------------
> ----
         pers |  .053484    .02908    1.839    0.066   -.010147   .038753   .11
> 0828  
      lgdpcap |  .012324   .008426    1.463    0.144    .000668   .009957   .02
> 1917  
         lpop |  .026743    .00569    4.700    0.000    .009624   .023972   .04
> 1874  
        oilpc |  .009797   .004258    2.301    0.022   -.001407   .005984     .
> 0166  
      *regnoc |  .033256   .022643    1.469    0.142   -.005135   .030383   .07
> 2313  
 lnl12econaid |  .001905   .008382    0.227    0.820   -.006122   .000601   .00
> 8683  
  lnl12milaid |  .001597   .003552    0.450    0.653   -.007106  -.000195   .00
> 8638  
         time |  .009098   .001757    5.178    0.000    -.00103   .007512   .01
> 7876  
    *americas |  .019395   .019949    0.972    0.331   -.024663   .013281   .05
> 1287  
         *ssa |  .004052   .022787    0.178    0.859   -.020283   .005675   .02
> 4437  
       *meast | -.047128   .022755   -2.071    0.039   -.066406  -.032904  -.00
> 9285  
        *asia |  .004643   .022672    0.205    0.838    -.01352   .008902   .02
> 9065  
       *easia | -.013532   .023155   -0.584    0.559   -.030585  -.003422   .02
> 3475  
--------------+----------------------------------------------------------------
> ----
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.          est store c3

.         * Check with missing lgdpcap data filled-in for Argentina *
.         qui:reg lgdpcap lgdp lpop i.cow i.year

.         predict hat 
(option xb assumed; fitted values)
(77 missing values generated)

.          krls case pers hat lpop oilpc regnoc lnl12econ lnl12mil time america
>  ssa meast asia easia if year>1996,deriv(k4) vcov
Iteration =  1, Looloss: 137.5917  
Iteration =  2, Looloss: 136.8383  
Iteration =  3, Looloss: 135.7407  
Iteration =  4, Looloss: 134.2278  
Iteration =  5, Looloss: 132.2888  
Iteration =  6, Looloss: 130.0062  
Iteration =  7, Looloss: 127.5431  
Iteration =  8, Looloss: 125.0832  
Iteration =  9, Looloss: 122.7781  
Iteration = 10, Looloss: 120.7386  
Iteration = 11, Looloss: 119.0477  
Iteration = 12, Looloss: 117.7709  
Iteration = 13, Looloss: 116.9601  
Iteration = 14, Looloss: 116.7878  

Pointwise Derivatives                                      Number of obs =     
>  619 
                                                           Lambda        =    .
> 8367 
                                                           Tolerance     =     
> .619 
                                                           Sigma         =     
>   13 
                                                           Eff. df       =     
> 69.3 
                                                           R2            =    .
> 3576 
                                                           Looloss       =    1
> 16.6

         case |      Avg.       SE        t    P>|t|        P25       P50      
>  P75       
--------------+----------------------------------------------------------------
> ----
         pers |  .052319   .029749    1.759    0.079   -.010656   .038696   .10
> 8534  
          hat |  .014438   .008654    1.668    0.096    .000982    .01067   .02
> 4187  
         lpop |  .025946   .005866    4.424    0.000    .009644   .023341   .04
> 1497  
        oilpc |  .011256   .004382    2.569    0.010    -.00131   .006692   .01
> 8058  
      *regnoc |  .028755   .023245    1.237    0.217   -.004969   .027236   .06
> 0648  
 lnl12econaid |  3.3e-06   .008604    0.000    1.000   -.008797  -.000159    .0
> 0831  
  lnl12milaid |  .002181   .003636    0.600    0.549   -.005882   .000164   .00
> 9299  
         time |  .009669   .001793    5.394    0.000   -.000918   .008103   .01
> 9386  
    *americas |  .021679   .020452    1.060    0.290   -.026553   .010734   .05
> 5348  
         *ssa |  .003959   .023361    0.169    0.865   -.023203   .006008   .02
> 5002  
       *meast | -.047594   .023344   -2.039    0.042   -.069025  -.032807   -.0
> 0809  
        *asia |  .005708   .023247    0.246    0.806   -.013538   .009889   .03
> 0128  
       *easia | -.013737    .02378   -0.578    0.564   -.032229    -.0036   .02
> 5379  
--------------+----------------------------------------------------------------
> ----
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.                 twoway (kdensity k3_pers  , lcolor($color1) xline(0,lpattern(
> dash)) ///
>                 bw(0.015) xtitle(Derivatives) ylab(0 (2) 6,glcolor(gs15)))  (
> kdensity k4_pers,  ///
>                 lcolor($color2) bw(.015) legend(label(1 "n=615") lab(2 "n=619
> ") lab(3 "",,off) lab(4 "",off) ///
>                 order(1 2)  pos(2) ring(0) col(1)) ytitle(Density) )

.                 
.          * Other time frames *
.          krls case pers lgdpcap lpop oilpc regnoc time america ssa meast asia
>  easia if year>1978, vcov
Iteration =  1, Looloss: 202.4876  
Iteration =  2, Looloss: 201.8006  
Iteration =  3, Looloss: 200.8055  
Iteration =  4, Looloss: 199.4325  
Iteration =  5, Looloss: 197.6523  
Iteration =  6, Looloss: 195.4996  
Iteration =  7, Looloss: 193.0612  
Iteration =  8, Looloss: 190.4343  
Iteration =  9, Looloss: 187.7031  
Iteration = 10, Looloss: 184.957   
Iteration = 11, Looloss: 182.3122  
Iteration = 12, Looloss: 179.8973  
Iteration = 13, Looloss: 177.8102  
Iteration = 14, Looloss: 176.0856  
Iteration = 15, Looloss: 174.7039  
Iteration = 16, Looloss: 173.6249  
Iteration = 17, Looloss: 172.8088  
Iteration = 18, Looloss: 172.2163  
Iteration = 19, Looloss: 171.8045  

Pointwise Derivatives                                  Number of obs =     1292
>  
                                                       Lambda        =    .3989
>  
                                                       Tolerance     =    1.292
>  
                                                       Sigma         =       11
>  
                                                       Eff. df       =    99.22
>  
                                                       R2            =    .3414
>  
                                                       Looloss       =    171.3

     case |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
----------+--------------------------------------------------------------------
     pers |  .061077   .021826    2.798    0.005   -.025161   .023459   .097812
>   
  lgdpcap |  .016535   .008525    1.940    0.053    .000551    .00982   .026395
>   
     lpop |  .024835    .00458    5.422    0.000    .001694   .017581   .042745
>   
    oilpc |  .008522   .004069    2.094    0.036   -.004555    .00279   .015914
>   
  *regnoc |  .024636    .01511    1.630    0.103   -.013072   .012689   .057485
>   
     time |  .002587   .000459    5.630    0.000   -.001685   .000601   .005823
>   
*americas |  .016889    .01545    1.093    0.275   -.018849    .00666   .036036
>   
     *ssa |  .000975   .016825    0.058    0.954   -.020574  -.001022   .022585
>   
   *meast | -.026758   .013476   -1.986    0.047   -.039362   -.00479   .008806
>   
    *asia |  .000639   .017569    0.036    0.971   -.012694   .003014   .017827
>   
   *easia | -.018337    .01626   -1.128    0.260   -.029756  -.004858   .008402
>   
----------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.          krls case pers lgdpcap lpop oilpc regnoc time america ssa meast asia
>  easia if year>2000, vcov
Iteration =  1, Looloss: 109.2641  
Iteration =  2, Looloss: 108.6565  
Iteration =  3, Looloss: 107.778   
Iteration =  4, Looloss: 106.5774  
Iteration =  5, Looloss: 105.0534  
Iteration =  6, Looloss: 103.2786  
Iteration =  7, Looloss: 101.3877  
Iteration =  8, Looloss: 99.53474  
Iteration =  9, Looloss: 97.85797  
Iteration = 10, Looloss: 96.46906  
Iteration = 11, Looloss: 95.45239  
Iteration = 12, Looloss: 94.86007  
Iteration = 13, Looloss: 94.94192  

Pointwise Derivatives                                  Number of obs =      437
>  
                                                       Lambda        =    .8772
>  
                                                       Tolerance     =     .437
>  
                                                       Sigma         =       11
>  
                                                       Eff. df       =    51.83
>  
                                                       R2            =    .3603
>  
                                                       Looloss       =     94.7

     case |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
----------+--------------------------------------------------------------------
     pers |  .061778   .037571    1.644    0.101   -.014988   .049477   .122007
>   
  lgdpcap |  .025606   .011135    2.300    0.022    .010499   .023229   .036379
>   
     lpop |  .034737   .007372    4.712    0.000    .015138   .032035   .051882
>   
    oilpc |  .012973    .00575    2.256    0.025   -.000946   .007038   .020988
>   
  *regnoc |  .049019   .029495    1.662    0.097   -.002199   .048848   .093903
>   
     time |  .013492   .002945    4.581    0.000    .000085    .01285   .025782
>   
*americas |  .032044   .026864    1.193    0.234   -.019756   .023038   .073665
>   
     *ssa |    .0036   .029057    0.124    0.901   -.027695   .007387   .044009
>   
   *meast | -.057954   .028195   -2.055    0.040   -.095277  -.039909  -.008484
>   
    *asia |  .003337   .030581    0.109    0.913   -.017364   .015605   .040427
>   
   *easia | -.035915   .032187   -1.116    0.265   -.059179  -.016585   .011004
>   
----------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.          krls case pers lgdpcap lpop oilpc regnoc      america ssa meast asia
>  easia if year>2006, vcov                  
Iteration =  1, Looloss: 60.27614  
Iteration =  2, Looloss: 59.87156  
Iteration =  3, Looloss: 59.28289  
Iteration =  4, Looloss: 58.47054  
Iteration =  5, Looloss: 57.42265  
Iteration =  6, Looloss: 56.17459  
Iteration =  7, Looloss: 54.81764  
Iteration =  8, Looloss: 53.48769  
Iteration =  9, Looloss: 52.33016  
Iteration = 10, Looloss: 51.45523  
Iteration = 11, Looloss: 50.91128  

Pointwise Derivatives                                  Number of obs =      170
>  
                                                       Lambda        =    .5312
>  
                                                       Tolerance     =      .17
>  
                                                       Sigma         =       10
>  
                                                       Eff. df       =     29.9
>  
                                                       R2            =     .443
>  
                                                       Looloss       =    50.68

     case |      Avg.       SE        t    P>|t|        P25       P50       P75
>        
----------+--------------------------------------------------------------------
     pers |   .06108   .072754    0.840    0.402   -.069319   .039369   .199463
>   
  lgdpcap |  .055988   .020643    2.712    0.007    .030253   .058126   .084285
>   
     lpop |  .070646   .013948    5.065    0.000    .040959   .075814   .100584
>   
    oilpc |  .032807   .010426    3.147    0.002     .01093   .018278   .047271
>   
  *regnoc |   .08982   .057412    1.564    0.120    .023239    .10572   .156077
>   
*americas |  .094904   .052325    1.814    0.072   -.012502   .069463   .198814
>   
     *ssa |  .038367   .055821    0.687    0.493    -.01718   .035589   .090948
>   
   *meast | -.079465   .055361   -1.435    0.153   -.145418  -.059668    .00561
>   
    *asia |    .0272    .05787    0.470    0.639   -.001015   .044297   .082486
>   
   *easia | -.033318   .062089   -0.537    0.592   -.065927  -.012404   .042932
>   
----------+--------------------------------------------------------------------
* average dy/dx is the first difference using the min and max (i.e. usually 0 t
> o 1)

.         
.         * KRLS estimates *
.                 global color1="gs1"

.                 global color2="gs8"

.                 global color3="gs12"

.                                 global vars = 6 /* number of variables we wan
> t to not display */

.                                 gen count=_n

.                                 gen name = ""
(1,373 missing values generated)

.                                 forval m = 1/3 {
  2.                                         gen hi`m' =.
  3.                                         gen lo`m' =.
  4.                                         gen mhi`m'  =.
  5.                                         gen mlo`m' =.
  6.                                         gen b`m' =.
  7.                                         gen v`m'=.                        
>       /* number of variables we want to display */
  8.                                         qui:est restore c`m' 
  9.                                         matrix O =  e(Output)
 10.                                         scalar r = rowsof(O)
 11.                                         local r =  r
 12.                                         replace v`m'=r- $vars
 13.                                         forval c = 1/`r'  {
 14.                                                 local d1 = `c'+2+ 2*`m' 
 15.                                                 local d = `c'
 16.                                                 if `c'> v`m' {
 17.                                                         local d =`d1'
 18.                                                 }
 19.                                                 local rownms: rown O 
 20.                                                 local rowname: word `c' of
>  `rownms'
 21.                                                 replace name = "`rowname'"
>  if count==`d'
 22.                                                 local beta = O[`c',1]
 23.                                                 local var = O[`c',2]
 24.                                                 matrix d==(0,0,0,0,0\0,0,0
> ,0,0)
 25.                                                 matrix d[1,3]=  `beta'
 26.                                                 matrix d[1,5] =  `beta' + 
> 1.96*`var'
 27.                                                 matrix d[1,1] =  `beta' - 
> 1.96*`var'
 28.                                                 matrix d[1,4] =  `beta' + 
> 1.65*`var'
 29.                                                 matrix d[1,2] =  `beta' - 
> 1.65*`var'
 30.                                                 qui replace hi`m'    =  d[
> 1,5] if count==`d'
 31.                                                 qui replace lo`m'    =  d[
> 1,1] if count==`d'
 32.                                                 qui replace mhi`m'    =  d
> [1,4] if count==`d'
 33.                                                 qui replace mlo`m'    =  d
> [1,2] if count==`d'
 34.                                                 qui replace b`m'  =  d[1,3
> ] if count==`d'
 35.                                         }
 36.                                         sum name hi`m'  lo`m'  b`m' v`m' c
> ount
 37.                                 }
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 real changes made)
variable name was str1 now str4
(1 real change made)
variable name was str4 now str7
(1 real change made)
(1 real change made)
(1 real change made)
variable name was str7 now str8
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        name |          0
         hi1 |          9    .0643705     .055543   .0113676   .1981621
         lo1 |          9   -.0127996    .0440756  -.0752775   .0662171
          b1 |          9    .0257855    .0455702  -.0319549   .1321896
          v1 |      1,373           3           0          3          3
-------------+---------------------------------------------------------
       count |      1,373         687    396.4953          1       1373
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        name |          0
         hi2 |         11    .0504205    .0431162  -.0027192   .1519334
         lo2 |         11   -.0212731    .0390019  -.0898786   .0228698
          b2 |         11    .0145737    .0358633  -.0462989   .0874016
          v2 |      1,373           5           0          5          5
-------------+---------------------------------------------------------
       count |      1,373         687    396.4953          1       1373
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 missing values generated)
(1,373 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
variable name was str8 now str12
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        name |          0
         hi3 |         13     .038311    .0310123  -.0025286   .1104805
         lo3 |         13   -.0205211    .0298637  -.0917266   .0155908
          b3 |         13     .008895    .0238191  -.0471276    .053484
          v3 |      1,373           7           0          7          7
-------------+---------------------------------------------------------
       count |      1,373         687    396.4953          1       1373

.                                 gen count1=(count*-1)+8

.                                 gen count2=count1-.333

.                                 gen count3=count2-.333

.          
.                                 twoway (scatter count1 b1 if count>=1 & count
> <=7,ylab(1(1)7,glcolor(gs16)) mcolor($color1) msymbol(T) yscale(range(0.75 7.
> 25)) ///
>                                 xtitle(Estimate,size(medsmall)) xline(0,lpat(
> dash))) (rspike hi1 lo1 count1 if count>=1 &count<=7, horizontal ytitle("") t
> itle(Time-varying,size(medium)) ///
>                                 ylab(6.67 "{bf:Personalism}" 5.67 "GDP pc" 4.
> 67 "Population" 3.67 "Oil rents" 2.67 "Regulatory NOC" 1.67 "Economic aid" 0.
> 67 "Military aid") ///
>                                 lcolor($color1) lwidth(medthin) legend(lab(1 
> "base model") lab(4 "add oil") lab(7 "add aid") order(1 4 7) col(3) pos(6) ri
> ng(.5)))              ///
>                                 (rspike mhi1 mlo1 count1 if count>=1 &count<=
> 7, lwidth(thick) lcolor($color1) horizontal saving(h2.gph,replace))  ///
>                                 ///
>                                 (scatter count2 b2 if count>=1 & count<=7,mco
> lor($color2) msymbol(S)) ///
>                                 (rspike hi2 lo2 count2 if count>=1 &count<=7,
>  horizontal lcolor($color2) lwidth(medthin)) ///
>                                 (rspike mhi2 mlo2 count2 if count>=1 &count<=
> 7, horizontal lcolor($color2) lwidth(thick)) ///
>                                 ///
>                                 (scatter count3 b3 if count>=1 & count<=7,mco
> lor($color3) msymbol(plus) msize(vlarge)) ///
>                                 (rspike hi3 lo3 count3 if count>=1 &count<=7,
>  horizontal lcolor($color3) lwidth(medthin)) ///
>                                 (rspike mhi3 mlo3 count3 if count>=1 &count<=
> 7, horizontal lcolor($color3) lwidth(thick) ///
>                                 yline(6.165,lpat(solid)lcol(gs15)) yline(5.16
> 5,lpat(solid)lcol(gs15)) yline(4.165,lpat(solid)lcol(gs15))  ///
>                                 yline(3.165,lpat(solid)lcol(gs15)) yline(2.16
> 5,lpat(solid)lcol(gs15)) yline(1.165,lpat(solid)lcol(gs15)))
(note: file h2.gph not found)
(file h2.gph saved)

.                                 drop name hi* lo* b* count* mhi* mlo* v1 v2 v
> 3

.                                 gr combine h1.gph h2.gph,xsize(4) ysize(2.25)

.                                 graph export "$dir\golden\Corruption-KRLS.pdf
> ", as(pdf)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Corruption-KRLS.pdf written in PDF format)

.                                 graph export "$dir\golden\ISQ-Figure-10.png",
>  as(png)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\ISQ-Figure-10.png written in PNG format)

.  
.                 * KRLS densities, by reg NOC *
.                 twoway (kdensity k3_pers if regnoc==1, lcolor($color1) xline(
> 0,lpattern(dash)) ///
>                 bw(0.015) xtitle(Derivatives) ylab(0 (2) 6,glcolor(gs15)))  (
> kdensity k3_pers if regnoc==0,  ///
>                 lcolor($color2) bw(.015) legend(label(1 "Reg NOC") lab(2 "no 
> Reg NOC") lab(3 "",,off) lab(4 "",off) ///
>                 order(1 2)  pos(2) ring(0) col(1)) ytitle(Density)  ///
>                 text(2.3  -.185 " {bf:{&mu} =0.011}",linegap(-1.3)place(n)) /
> //
>                 text(5.25  .15 " {bf:{&mu} =0.093}",linegap(-1.3)place(n)))  
> ///
>                 (pcarrowi 2.25  -.175 1.6  -.09)  ///
>                 (pcarrowi 5.25  .15 4.5  .07,saving(h2,replace) title(Model 3
> ))
(file h2.gph saved)

. 
.                 ttest k2_pers,by(regnoc)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     319    .1324644    .0091521     .163462    .1144581    .1504707
       1 |     296    .0388374    .0076644    .1318625    .0237536    .0539211
---------+--------------------------------------------------------------------
combined |     615    .0874016    .0062968    .1561558    .0750357    .0997675
---------+--------------------------------------------------------------------
    diff |             .093627    .0120325                .0699972    .1172569
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   7.7812
Ho: diff = 0                                     degrees of freedom =      613

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                 twoway (kdensity k2_pers if regnoc==1, lcolor($color1) xline(
> 0,lpattern(dash)) ///
>                 bw(0.015) xtitle(Derivatives) ylab(0 (2) 6,glcolor(gs15)))  (
> kdensity k2_pers if regnoc==0,  ///
>                 lcolor($color2) bw(.015) legend(label(1 "Reg NOC") lab(2 "no 
> Reg NOC") lab(3 "",,off) lab(4 "",off) ///
>                 order(1 2)  pos(2) ring(0) col(1)) ytitle(Density)  ///
>                 text(1.8  .38 " {bf:{&mu} =0.132}",linegap(-1.3)place(n)) ///
>                 text(5.5  .15 " {bf:{&mu} =0.038}",linegap(-1.3)place(n)))  /
> //
>                 (pcarrowi 1.75  .38 1.31  .335)  ///
>                 (pcarrowi 5.5  .15 5.2  .07,saving(h1,replace) title(Model 2)
> )
(file h1.gph saved)

.                 gr combine h1.gph h2.gph,xsize(4.6) ysize(2.25)

.                 graph export "$dir\golden\Corruption-KRLS-Densities.pdf", as(
> pdf)   replace
(file C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\golden\Corruption-KRLS-Densities.pdf written in PDF fo
> rmat)

.                 
.   erase h1.gph 

.   erase h2.gph

. 
.   ****************************************** End of Corruption file *********
> ****************************
. 
end of do-file

.                                 
. 
.                                 
.                                 *** ERASE temporary files and .gph ***
.                                 cd "$dir"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files

.                                 erase temp_primary.dta

.                                 erase temp_secondary.dta

.                                 forval i =1(1)4{
  2.                                         erase f`i'.gph
  3.                                 }

.                                 forval i =1(1)10{
  2.                                         erase h`i'.gph
  3.                                 }

.                                 forval i =1(1)2{
  2.                                         erase s`i'.gph
  3.                                 }

.                                                 
.                                 ****************
.                                 *** Figure 8 ***
.                                 ****************
.                                 cd "$dir\industry-level"
C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submission\R
> eplication Files\industry-level

.                                 do savecoefs-industry   /* estimates saved in
>  coefs.dta and coefs_nonimputed.dta */

. clear

. 
. * set working directory
. 
. use IndustryLevelFDI.dta, clear

. *****************************************************************************
> ***
. *************************** Imputed Data ************************************
> ***
. *****************************************************************************
> ***
. #delimit ;
delimiter now ;
. global covars="gwf_personal allexp gtime lgdpcap lpop lopenness grow 
> incidencev413 meanreserves ldevelopingfdi asia americas easia ssa";

.  #delimit cr
delimiter now cr
. 
. set more off

. ****
. ! dir Industry*.csv /a-d /b > filelist.txt

. 
. * command started with "file"* execute lines 19-42 together
. file open myfile using "filelist.txt", read

. file read myfile line

. import delimited `line',clear
(20 vars, 1,782 obs)

. xtset cowcode year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

. xtregar cub_*_gdp $covars, re

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.1476                                         min =         19
     between = 0.7638                                         avg =       29.2
     overall = 0.2995                                         max =         31

                                                Wald chi2(15)     =     417.33
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2025   0.2025     0.2796     0.2796   0.2796

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0076731   .0082582     0.93   0.353    -.0085126    .0238588
      allexp |  -.0133098   .0052997    -2.51   0.012     -.023697   -.0029226
       gtime |   .0086001   .0023464     3.67   0.000     .0040012     .013199
     lgdpcap |   .0189279   .0034593     5.47   0.000     .0121478     .025708
        lpop |   .0155266   .0028387     5.47   0.000     .0099629    .0210902
   lopenness |  -.0026529   .0066966    -0.40   0.692    -.0157779    .0104721
        grow |   .0017192   .0003558     4.83   0.000     .0010218    .0024166
incidenc~413 |  -.0212415   .0060629    -3.50   0.000    -.0331246   -.0093584
meanreserves |  -.0018574    .001701    -1.09   0.275    -.0051914    .0014765
ldevelopin~i |   .0127647   .0019026     6.71   0.000     .0090358    .0164937
        asia |  -.0255648   .0115469    -2.21   0.027    -.0481963   -.0029334
    americas |  -.0222272   .0084788    -2.62   0.009    -.0388453   -.0056091
       easia |   -.018764   .0115726    -1.62   0.105    -.0414458    .0039179
         ssa |  -.0534549   .0107672    -4.96   0.000    -.0745583   -.0323516
       _cons |   -.495276    .059841    -8.28   0.000    -.6125621   -.3779898
-------------+----------------------------------------------------------------
      rho_ar |  .14700426   (estimated autocorrelation coefficient)
     sigma_u |  .01517395
     sigma_e |  .07525918
     rho_fov |  .03906368   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. regsave $covars _cons using coefs.dta, ci level(95) replace
file coefs.dta saved

. use coefs.dta, clear

. gen im=substr("`line'",1, length("`line'")-4)

. save coefs.dta, replace
file coefs.dta saved

. 
. file read myfile line

. while r(eof)==0 {
  2.  import delimited `line',clear
  3.  xtset cowcode year
  4.  xtregar cub_*_gdp $covars, re
  5.  regsave $covars _cons using temp.dta, ci level(95) replace
  6.  use temp.dta, clear
  7.  gen im=substr("`line'",1, length("`line'")-4)
  8.  append using coefs.dta
  9.  save coefs.dta, replace
 10.  file read myfile line
 11. }
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0932                                         min =         19
     between = 0.7308                                         avg =       29.2
     overall = 0.2617                                         max =         31

                                                Wald chi2(15)     =     304.41
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2671   0.2671     0.3542     0.3542   0.3542

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0105301   .0083368     1.26   0.207    -.0058096    .0268698
      allexp |  -.0009913   .0051926    -0.19   0.849    -.0111687     .009186
       gtime |   .0072429   .0023486     3.08   0.002     .0026396    .0118461
     lgdpcap |   .0171731    .003641     4.72   0.000      .010037    .0243093
        lpop |   .0171329   .0029549     5.80   0.000     .0113414    .0229244
   lopenness |    .001517   .0067107     0.23   0.821    -.0116358    .0146698
        grow |   .0004236   .0003513     1.21   0.228    -.0002648     .001112
incidenc~413 |  -.0277962   .0060796    -4.57   0.000    -.0397119   -.0158805
meanreserves |  -.0039345   .0018018    -2.18   0.029     -.007466    -.000403
ldevelopin~i |   .0087866   .0018589     4.73   0.000     .0051432      .01243
        asia |  -.0320363   .0122001    -2.63   0.009    -.0559481   -.0081244
    americas |  -.0321403   .0089791    -3.58   0.000    -.0497389   -.0145416
       easia |  -.0510715    .012271    -4.16   0.000    -.0751222   -.0270208
         ssa |  -.0677503   .0114317    -5.93   0.000    -.0901559   -.0453446
       _cons |  -.4581729   .0615864    -7.44   0.000    -.5788799   -.3374658
-------------+----------------------------------------------------------------
      rho_ar |  .12017399   (estimated autocorrelation coefficient)
     sigma_u |  .01788502
     sigma_e |  .07442725
     rho_fov |  .05459263   (fraction of variance due to u_i)
------------------------------------------------------------------------------
(note: file temp.dta not found)
file temp.dta saved
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.1239                                         min =         19
     between = 0.7022                                         avg =       29.2
     overall = 0.2893                                         max =         31

                                                Wald chi2(15)     =     334.44
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.3119   0.3119     0.4027     0.4027   0.4027

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0010907   .0092018    -0.12   0.906     -.019126    .0169445
      allexp |  -.0101693    .005512    -1.84   0.065    -.0209725     .000634
       gtime |   .0074496   .0025483     2.92   0.003     .0024551    .0124441
     lgdpcap |   .0172468   .0040356     4.27   0.000     .0093373    .0251564
        lpop |   .0139134   .0033583     4.14   0.000     .0073314    .0204955
   lopenness |   .0015672   .0072591     0.22   0.829    -.0126603    .0157947
        grow |   .0019925   .0003696     5.39   0.000     .0012681    .0027169
incidenc~413 |  -.0329691   .0065905    -5.00   0.000    -.0458862    -.020052
meanreserves |  -.0024026   .0020697    -1.16   0.246    -.0064591     .001654
ldevelopin~i |   .0096975   .0019997     4.85   0.000      .005778    .0136169
        asia |  -.0479678   .0140066    -3.42   0.001    -.0754203   -.0205153
    americas |  -.0514323   .0103163    -4.99   0.000    -.0716518   -.0312127
       easia |  -.0586913   .0141323    -4.15   0.000    -.0863901   -.0309925
         ssa |   -.074511   .0131202    -5.68   0.000    -.1002263   -.0487958
       _cons |  -.4036591   .0689912    -5.85   0.000    -.5388793   -.2684389
-------------+----------------------------------------------------------------
      rho_ar |  .14431344   (estimated autocorrelation coefficient)
     sigma_u |  .02179035
     sigma_e |  .07774419
     rho_fov |  .07283645   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0639                                         min =         19
     between = 0.7561                                         avg =       29.2
     overall = 0.2496                                         max =         31

                                                Wald chi2(15)     =     285.60
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2298   0.2298     0.3120     0.3120   0.3120

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0014142   .0084775     0.17   0.868    -.0152014    .0180298
      allexp |  -.0119669    .005405    -2.21   0.027    -.0225606   -.0013732
       gtime |   .0086322   .0024064     3.59   0.000     .0039157    .0133487
     lgdpcap |   .0176532   .0035634     4.95   0.000      .010669    .0246374
        lpop |   .0146525   .0029495     4.97   0.000     .0088716    .0204334
   lopenness |  -.0085584   .0068699    -1.25   0.213    -.0220232    .0049064
        grow |   .0010539    .000365     2.89   0.004     .0003385    .0017693
incidenc~413 |  -.0261303   .0062259    -4.20   0.000    -.0383328   -.0139279
meanreserves |  -.0018408   .0017754    -1.04   0.300    -.0053205    .0016389
ldevelopin~i |   .0055277   .0019164     2.88   0.004     .0017716    .0092838
        asia |  -.0475279   .0120546    -3.94   0.000    -.0711545   -.0239013
    americas |  -.0381836   .0088583    -4.31   0.000    -.0555455   -.0208216
       easia |  -.0452096   .0121112    -3.73   0.000    -.0689471    -.021472
         ssa |  -.0639911   .0112281    -5.70   0.000    -.0859979   -.0419844
       _cons |  -.3365089   .0622611    -5.40   0.000    -.4585385   -.2144794
-------------+----------------------------------------------------------------
      rho_ar |  .12308898   (estimated autocorrelation coefficient)
     sigma_u |  .01666977
     sigma_e |  .07751803
     rho_fov |  .04419983   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.1096                                         min =         19
     between = 0.7145                                         avg =       29.2
     overall = 0.2852                                         max =         31

                                                Wald chi2(15)     =     330.47
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.3166   0.3166     0.4080     0.4080   0.4080

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0010641   .0093272     0.11   0.909    -.0172169    .0193451
      allexp |  -.0074505   .0056568    -1.32   0.188    -.0185377    .0036367
       gtime |   .0044118   .0026022     1.70   0.090    -.0006883    .0095119
     lgdpcap |   .0143031   .0040987     3.49   0.000     .0062699    .0223364
        lpop |   .0167224   .0034078     4.91   0.000     .0100433    .0234015
   lopenness |   .0086422   .0075158     1.15   0.250    -.0060885     .023373
        grow |   .0017439   .0003813     4.57   0.000     .0009965    .0024913
incidenc~413 |  -.0424955   .0067531    -6.29   0.000    -.0557314   -.0292597
meanreserves |  -.0018202   .0020952    -0.87   0.385    -.0059267    .0022864
ldevelopin~i |   .0089538   .0020399     4.39   0.000     .0049556    .0129519
        asia |  -.0505267   .0141859    -3.56   0.000    -.0783304   -.0227229
    americas |   -.051969   .0104641    -4.97   0.000    -.0724781   -.0314598
       easia |  -.0490005   .0142976    -3.43   0.001    -.0770232   -.0209778
         ssa |  -.0839385   .0132954    -6.31   0.000     -.109997     -.05788
       _cons |  -.4364624   .0702529    -6.21   0.000    -.5741555   -.2987693
-------------+----------------------------------------------------------------
      rho_ar |  .10488965   (estimated autocorrelation coefficient)
     sigma_u |  .02219526
     sigma_e |  .08156914
     rho_fov |  .06893633   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.1628                                         min =         19
     between = 0.7028                                         avg =       29.2
     overall = 0.3256                                         max =         31

                                                Wald chi2(15)     =     405.57
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.3603   0.3603     0.4530     0.4530   0.4530

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0035633   .0089367    -0.40   0.690    -.0210789    .0139523
      allexp |  -.0154867    .005227    -2.96   0.003    -.0257314   -.0052421
       gtime |   .0080544   .0024572     3.28   0.001     .0032384    .0128705
     lgdpcap |   .0234788   .0040663     5.77   0.000      .015509    .0314485
        lpop |   .0076104   .0033731     2.26   0.024     .0009993    .0142215
   lopenness |  -.0020935   .0071667    -0.29   0.770    -.0161399     .011953
        grow |    .001434   .0003535     4.06   0.000     .0007411    .0021268
incidenc~413 |  -.0208698   .0063635    -3.28   0.001     -.033342   -.0083975
meanreserves |  -.0003135   .0021007    -0.15   0.881    -.0044308    .0038037
ldevelopin~i |   .0153526   .0019232     7.98   0.000     .0115832    .0191219
        asia |  -.0067843   .0141969    -0.48   0.633    -.0346097    .0210412
    americas |  -.0195696   .0104769    -1.87   0.062    -.0401039    .0009647
       easia |  -.0026294   .0143366    -0.18   0.854    -.0307285    .0254697
         ssa |   -.048841   .0133488    -3.66   0.000    -.0750042   -.0226778
       _cons |  -.4343613   .0686595    -6.33   0.000    -.5689314   -.2997913
-------------+----------------------------------------------------------------
      rho_ar |  .12724791   (estimated autocorrelation coefficient)
     sigma_u |  .02327518
     sigma_e |  .07425539
     rho_fov |  .08946003   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.1372                                         min =         19
     between = 0.7272                                         avg =       29.2
     overall = 0.3238                                         max =         31

                                                Wald chi2(15)     =     370.40
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.3472   0.3472     0.4395     0.4395   0.4395

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0124506   .0084499     1.47   0.141    -.0041109    .0290121
      allexp |  -.0107207   .0049888    -2.15   0.032    -.0204985   -.0009428
       gtime |   .0105617   .0023315     4.53   0.000     .0059922    .0151313
     lgdpcap |   .0199643   .0038211     5.22   0.000     .0124752    .0274535
        lpop |   .0154905   .0031681     4.89   0.000     .0092811    .0216998
   lopenness |    .015804   .0067585     2.34   0.019     .0025576    .0290504
        grow |   .0010942    .000335     3.27   0.001     .0004376    .0017509
incidenc~413 |  -.0112361   .0060273    -1.86   0.062    -.0230494    .0005772
meanreserves |  -.0000705   .0019633    -0.04   0.971    -.0039186    .0037775
ldevelopin~i |    .009112    .001816     5.02   0.000     .0055528    .0126713
        asia |  -.0156004   .0132695    -1.18   0.240    -.0416081    .0104073
    americas |  -.0133358   .0097859    -1.36   0.173    -.0325158    .0058443
       easia |   -.020306   .0134178    -1.51   0.130    -.0466044    .0059923
         ssa |  -.0541886   .0124583    -4.35   0.000    -.0786065   -.0297707
       _cons |  -.5474443   .0646923    -8.46   0.000    -.6742388   -.4206498
-------------+----------------------------------------------------------------
      rho_ar |  .13002033   (estimated autocorrelation coefficient)
     sigma_u |  .02147198
     sigma_e |  .07072573
     rho_fov |  .08439156   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0998                                         min =         19
     between = 0.6438                                         avg =       29.2
     overall = 0.3017                                         max =         31

                                                Wald chi2(15)     =     273.54
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.4639   0.4639     0.5538     0.5538   0.5538

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0018058   .0094888    -0.19   0.849    -.0204034    .0167919
      allexp |   .0006716   .0052545     0.13   0.898    -.0096271    .0109703
       gtime |   .0150783    .002554     5.90   0.000     .0100726     .020084
     lgdpcap |   .0154398   .0045806     3.37   0.001      .006462    .0244177
        lpop |   .0126494   .0039187     3.23   0.001     .0049688      .02033
   lopenness |     .01242   .0075365     1.65   0.099    -.0023512    .0271913
        grow |   .0016488   .0003546     4.65   0.000     .0009538    .0023439
incidenc~413 |  -.0281923    .006607    -4.27   0.000    -.0411418   -.0152427
meanreserves |  -.0017808   .0025075    -0.71   0.478    -.0066954    .0031339
ldevelopin~i |   .0039179   .0019801     1.98   0.048     .0000369    .0077989
        asia |  -.0370307   .0169175    -2.19   0.029    -.0701885   -.0038729
    americas |  -.0443281   .0125247    -3.54   0.000    -.0688762   -.0197801
       easia |  -.0616776   .0171877    -3.59   0.000    -.0953648   -.0279904
         ssa |  -.0721519   .0159746    -4.52   0.000    -.1034616   -.0408422
       _cons |  -.3690725   .0771221    -4.79   0.000    -.5202291    -.217916
-------------+----------------------------------------------------------------
      rho_ar |  .11397507   (estimated autocorrelation coefficient)
     sigma_u |   .0302597
     sigma_e |    .074726
     rho_fov |  .14087726   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.1333                                         min =         19
     between = 0.6969                                         avg =       29.2
     overall = 0.2886                                         max =         31

                                                Wald chi2(15)     =     362.89
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.3525   0.3525     0.4454     0.4454   0.4454

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0182425   .0088954     2.05   0.040     .0008078    .0356771
      allexp |  -.0092819   .0053244    -1.74   0.081    -.0197176    .0011538
       gtime |   .0107934   .0024673     4.37   0.000     .0059576    .0156292
     lgdpcap |   .0146034   .0040149     3.64   0.000     .0067342    .0224725
        lpop |   .0191616   .0033421     5.73   0.000     .0126112    .0257121
   lopenness |   .0061513   .0071599     0.86   0.390    -.0078818    .0201844
        grow |   .0017064   .0003619     4.72   0.000     .0009972    .0024157
incidenc~413 |  -.0448205   .0064039    -7.00   0.000     -.057372   -.0322691
meanreserves |  -.0015051   .0020668    -0.73   0.466    -.0055559    .0025457
ldevelopin~i |   .0084648   .0019086     4.44   0.000      .004724    .0122056
        asia |   -.044996   .0139639    -3.22   0.001    -.0723647   -.0176272
    americas |  -.0348465   .0103118    -3.38   0.001    -.0550572   -.0146358
       easia |  -.0358178   .0141304    -2.53   0.011    -.0635129   -.0081227
         ssa |  -.0578115   .0131327    -4.40   0.000    -.0835512   -.0320718
       _cons |  -.4954804   .0682064    -7.26   0.000    -.6291625   -.3617982
-------------+----------------------------------------------------------------
      rho_ar |  .08800252   (estimated autocorrelation coefficient)
     sigma_u |  .02271799
     sigma_e |  .07711621
     rho_fov |  .07985544   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.1551                                         min =         19
     between = 0.6431                                         avg =       29.2
     overall = 0.3178                                         max =         31

                                                Wald chi2(15)     =     362.03
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.4433   0.4433     0.5345     0.5345   0.5345

------------------------------------------------------------------------------
cub_isicno~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0148146   .0090603     1.64   0.102    -.0029433    .0325726
      allexp |  -.0117348    .005073    -2.31   0.021    -.0216777   -.0017919
       gtime |   .0107738   .0024508     4.40   0.000     .0059703    .0155773
     lgdpcap |   .0184019   .0043315     4.25   0.000     .0099124    .0268915
        lpop |    .018412   .0036752     5.01   0.000     .0112087    .0256153
   lopenness |   .0200794   .0072169     2.78   0.005     .0059346    .0342242
        grow |   .0023469   .0003416     6.87   0.000     .0016774    .0030163
incidenc~413 |  -.0184074   .0063386    -2.90   0.004    -.0308308    -.005984
meanreserves |  -.0024091   .0023347    -1.03   0.302     -.006985    .0021667
ldevelopin~i |   .0069052   .0019016     3.63   0.000     .0031781    .0106322
        asia |  -.0248334   .0157553    -1.58   0.115    -.0557131    .0060463
    americas |  -.0175371   .0116562    -1.50   0.132    -.0403828    .0053087
       easia |  -.0394928   .0160053    -2.47   0.014    -.0708626   -.0081229
         ssa |  -.0582747   .0148582    -3.92   0.000    -.0873963   -.0291531
       _cons |  -.5620766   .0729341    -7.71   0.000    -.7050247   -.4191284
-------------+----------------------------------------------------------------
      rho_ar |  .11736652   (estimated autocorrelation coefficient)
     sigma_u |    .027745
     sigma_e |  .07202779
     rho_fov |  .12920651   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0831                                         min =         19
     between = 0.8541                                         avg =       29.2
     overall = 0.2829                                         max =         31

                                                Wald chi2(15)     =     512.07
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0757   0.0757     0.1151     0.1151   0.1151

------------------------------------------------------------------------------
cub_isicme~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0608696   .0103743     5.87   0.000     .0405365    .0812028
      allexp |  -.0482414   .0074675    -6.46   0.000    -.0628775   -.0336053
       gtime |  -.0027981    .003044    -0.92   0.358    -.0087641     .003168
     lgdpcap |   .0368906   .0040726     9.06   0.000     .0289086    .0448727
        lpop |   .0334347   .0033253    10.05   0.000     .0269172    .0399522
   lopenness |   .0354779   .0084727     4.19   0.000     .0188718    .0520841
        grow |  -.0013442   .0005116    -2.63   0.009    -.0023468   -.0003415
incidenc~413 |   .0045737   .0078662     0.58   0.561    -.0108439    .0199912
meanreserves |  -.0003256   .0019495    -0.17   0.867    -.0041466    .0034953
ldevelopin~i |   .0096943   .0025412     3.81   0.000     .0047136    .0146751
        asia |  -.0304089   .0132837    -2.29   0.022    -.0564444   -.0043734
    americas |   .0290161   .0097206     2.99   0.003     .0099641    .0480681
       easia |   .0497379   .0131709     3.78   0.000     .0239233    .0755524
         ssa |  -.0171181   .0122829    -1.39   0.163    -.0411921    .0069558
       _cons |  -1.040034   .0725767   -14.33   0.000    -1.182282   -.8977864
-------------+----------------------------------------------------------------
      rho_ar |  .07652098   (estimated autocorrelation coefficient)
     sigma_u |  .01136433
     sigma_e |  .11128867
     rho_fov |  .01032002   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0491                                         min =         19
     between = 0.7883                                         avg =       29.2
     overall = 0.1992                                         max =         31

                                                Wald chi2(15)     =     325.21
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0512   0.0512     0.0795     0.0795   0.0795

------------------------------------------------------------------------------
cub_isicme~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0214704   .0100448     2.14   0.033      .001783    .0411578
      allexp |  -.0308472   .0072836    -4.24   0.000    -.0451228   -.0165715
       gtime |  -.0105524   .0029432    -3.59   0.000    -.0163209   -.0047838
     lgdpcap |   .0301543   .0038726     7.79   0.000     .0225641    .0377444
        lpop |   .0264918    .003202     8.27   0.000      .020216    .0327676
   lopenness |   .0216324   .0081723     2.65   0.008     .0056149    .0376498
        grow |   .0007663   .0004963     1.54   0.123    -.0002064    .0017391
incidenc~413 |   .0057002   .0075798     0.75   0.452    -.0091559    .0205563
meanreserves |  -.0032091   .0018594    -1.73   0.084    -.0068535    .0004353
ldevelopin~i |   .0093911    .002484     3.78   0.000     .0045225    .0142597
        asia |  -.0295947   .0126937    -2.33   0.020    -.0544739   -.0047156
    americas |   .0071176   .0092868     0.77   0.443    -.0110842    .0253194
       easia |   .0314438   .0126215     2.49   0.013     .0067062    .0561815
         ssa |  -.0160253   .0116833    -1.37   0.170    -.0389242    .0068736
       _cons |   -.779736   .0703308   -11.09   0.000    -.9175818   -.6418901
-------------+----------------------------------------------------------------
      rho_ar |  .09827838   (estimated autocorrelation coefficient)
     sigma_u |  .00905351
     sigma_e |  .10747277
     rho_fov |  .00704638   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0698                                         min =         19
     between = 0.8210                                         avg =       29.2
     overall = 0.2771                                         max =         31

                                                Wald chi2(15)     =     408.26
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.1749   0.1749     0.2469     0.2469   0.2469

------------------------------------------------------------------------------
cub_isicme~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0338932   .0106056     3.20   0.001     .0131066    .0546798
      allexp |  -.0295171   .0071819    -4.11   0.000    -.0435933   -.0154409
       gtime |  -.0045728   .0030679    -1.49   0.136    -.0105858    .0014402
     lgdpcap |   .0326625     .00437     7.47   0.000     .0240975    .0412276
        lpop |   .0322741   .0035797     9.02   0.000      .025258    .0392902
   lopenness |   .0596724   .0087212     6.84   0.000     .0425792    .0767656
        grow |  -.0001232   .0004916    -0.25   0.802    -.0010866    .0008403
incidenc~413 |   .0237605    .007954     2.99   0.003     .0081709      .03935
meanreserves |  -.0070601   .0021226    -3.33   0.001    -.0112203      -.0029
ldevelopin~i |   .0029414   .0024805     1.19   0.236    -.0019203    .0078031
        asia |  -.0285213   .0144096    -1.98   0.048    -.0567637    -.000279
    americas |   .0082425   .0105929     0.78   0.437    -.0125192    .0290043
       easia |   .0011757   .0144454     0.08   0.935    -.0271366    .0294881
         ssa |   -.060335   .0134357    -4.49   0.000    -.0866685   -.0340015
       _cons |  -.9750521   .0764603   -12.75   0.000    -1.124911   -.8251927
-------------+----------------------------------------------------------------
      rho_ar |  .05948939   (estimated autocorrelation coefficient)
     sigma_u |  .01782357
     sigma_e |  .10706686
     rho_fov |  .02696544   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0948                                         min =         19
     between = 0.8075                                         avg =       29.2
     overall = 0.2530                                         max =         31

                                                Wald chi2(15)     =     433.04
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.1137   0.1137     0.1680     0.1680   0.1680

------------------------------------------------------------------------------
cub_isicme~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0261562   .0107429     2.43   0.015     .0051004    .0472119
      allexp |  -.0362306   .0075887    -4.77   0.000    -.0511043    -.021357
       gtime |  -.0096305   .0031372    -3.07   0.002    -.0157793   -.0034818
     lgdpcap |   .0402425   .0042532     9.46   0.000     .0319064    .0485786
        lpop |   .0308338   .0035135     8.78   0.000     .0239475    .0377201
   lopenness |   .0380772   .0088425     4.31   0.000     .0207462    .0554081
        grow |  -.0020602   .0005189    -3.97   0.000    -.0030773   -.0010431
incidenc~413 |  -.0122381   .0081265    -1.51   0.132    -.0281657    .0036895
meanreserves |  -.0031646   .0020601    -1.54   0.125    -.0072024    .0008732
ldevelopin~i |   .0121288   .0025718     4.72   0.000     .0070881    .0171694
        asia |  -.0284883   .0140346    -2.03   0.042    -.0559955   -.0009811
    americas |   .0057464   .0102848     0.56   0.576    -.0144113    .0259042
       easia |   .0330313   .0139973     2.36   0.018     .0055972    .0604655
         ssa |  -.0138794   .0129632    -1.07   0.284    -.0392868     .011528
       _cons |  -1.011487   .0762926   -13.26   0.000    -1.161018   -.8619566
-------------+----------------------------------------------------------------
      rho_ar |  .05757766   (estimated autocorrelation coefficient)
     sigma_u |  .01442067
     sigma_e |   .1137192
     rho_fov |  .01582615   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0604                                         min =         19
     between = 0.7942                                         avg =       29.2
     overall = 0.1673                                         max =         31

                                                Wald chi2(15)     =     333.63
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0000   0.0000     0.0000     0.0000   0.0000

------------------------------------------------------------------------------
cub_isicme~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0012559   .0105138     0.12   0.905    -.0193509    .0218626
      allexp |  -.0369143   .0080823    -4.57   0.000    -.0527552   -.0210733
       gtime |  -.0181013   .0031281    -5.79   0.000    -.0242322   -.0119704
     lgdpcap |   .0290478   .0039779     7.30   0.000     .0212512    .0368443
        lpop |    .023185    .003263     7.11   0.000     .0167896    .0295804
   lopenness |    .023862   .0085669     2.79   0.005     .0070713    .0406527
        grow |  -.0030987   .0005597    -5.54   0.000    -.0041957   -.0020016
incidenc~413 |   .0134715   .0080572     1.67   0.095    -.0023204    .0292634
meanreserves |  -.0024204   .0018847    -1.28   0.199    -.0061144    .0012735
ldevelopin~i |   .0124629    .002682     4.65   0.000     .0072062    .0177195
        asia |  -.0463799     .01289    -3.60   0.000    -.0716439   -.0211159
    americas |  -.0039441   .0094003    -0.42   0.675    -.0223683    .0144801
       easia |   .0026526    .012753     0.21   0.835    -.0223428     .027648
         ssa |  -.0290539    .011823    -2.46   0.014    -.0522265   -.0058813
       _cons |  -.7092725   .0726205    -9.77   0.000     -.851606   -.5669389
-------------+----------------------------------------------------------------
      rho_ar |   .0370072   (estimated autocorrelation coefficient)
     sigma_u |          0
     sigma_e |  .12449583
     rho_fov |          0   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0871                                         min =         19
     between = 0.8044                                         avg =       29.2
     overall = 0.2425                                         max =         31

                                                Wald chi2(15)     =     406.42
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.1459   0.1459     0.2105     0.2105   0.2105

------------------------------------------------------------------------------
cub_isicme~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |    .023461   .0104169     2.25   0.024     .0030442    .0438778
      allexp |  -.0208739   .0072446    -2.88   0.004    -.0350731   -.0066748
       gtime |  -.0147275    .003029    -4.86   0.000    -.0206642   -.0087907
     lgdpcap |    .027114    .004185     6.48   0.000     .0189115    .0353164
        lpop |   .0308972   .0034609     8.93   0.000      .024114    .0376804
   lopenness |   .0359339   .0085568     4.20   0.000     .0191629    .0527049
        grow |  -.0042145   .0004994    -8.44   0.000    -.0051934   -.0032357
incidenc~413 |   -.000398   .0078671    -0.05   0.960    -.0158171    .0150212
meanreserves |  -.0046513   .0020391    -2.28   0.023    -.0086477   -.0006548
ldevelopin~i |   .0109254   .0024622     4.44   0.000     .0060995    .0157513
        asia |  -.0515125   .0138464    -3.72   0.000     -.078651   -.0243741
    americas |   -.016917   .0101708    -1.66   0.096    -.0368514    .0030174
       easia |   .0127052   .0138659     0.92   0.360    -.0144714    .0398818
         ssa |  -.0550467   .0128465    -4.28   0.000    -.0802254   -.0298679
       _cons |   -.850177   .0744231   -11.42   0.000    -.9960436   -.7043104
-------------+----------------------------------------------------------------
      rho_ar |  .03419581   (estimated autocorrelation coefficient)
     sigma_u |   .0158673
     sigma_e |  .10989011
     rho_fov |  .02042335   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.1040                                         min =         19
     between = 0.8853                                         avg =       29.2
     overall = 0.2965                                         max =         31

                                                Wald chi2(15)     =     691.97
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0000   0.0000     0.0000     0.0000   0.0000

------------------------------------------------------------------------------
cub_isicme~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0694681   .0096751     7.18   0.000     .0505052     .088431
      allexp |  -.0648731   .0074247    -8.74   0.000    -.0794252    -.050321
       gtime |  -.0076904   .0028721    -2.68   0.007    -.0133196   -.0020611
     lgdpcap |    .037806   .0036566    10.34   0.000     .0306392    .0449727
        lpop |   .0428018   .0030021    14.26   0.000     .0369177    .0486858
   lopenness |   .0499531   .0078949     6.33   0.000     .0344794    .0654269
        grow |  -.0030771   .0005112    -6.02   0.000    -.0040791   -.0020751
incidenc~413 |  -.0078591   .0073979    -1.06   0.288    -.0223588    .0066405
meanreserves |   -.004884    .001735    -2.82   0.005    -.0082845   -.0014835
ldevelopin~i |   .0033787   .0024625     1.37   0.170    -.0014477     .008205
        asia |  -.0268568   .0118631    -2.26   0.024    -.0501081   -.0036056
    americas |   .0310546   .0086501     3.59   0.000     .0141007    .0480086
       easia |   .0598933   .0117594     5.09   0.000     .0368454    .0829412
         ssa |  -.0070854   .0108754    -0.65   0.515    -.0284009      .01423
       _cons |  -1.157416   .0669818   -17.28   0.000    -1.288698   -1.026134
-------------+----------------------------------------------------------------
      rho_ar |  .04427537   (estimated autocorrelation coefficient)
     sigma_u |          0
     sigma_e |  .11377698
     rho_fov |          0   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta saved
(20 vars, 1,782 obs)
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

RE GLS regression with AR(1) disturbances       Number of obs     =      1,782
Group variable: cowcode                         Number of groups  =         61

R-sq:                                           Obs per group:
     within  = 0.0343                                         min =         19
     between = 0.6982                                         avg =       29.2
     overall = 0.1645                                         max =         31

                                                Wald chi2(15)     =     202.05
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2242   0.2242     0.3063     0.3063   0.3063

------------------------------------------------------------------------------
cub_isicme~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0062975   .0118622     0.53   0.595     -.016952     .029547
      allexp |  -.0294173   .0078871    -3.73   0.000    -.0448757   -.0139589
       gtime |  -.0176292   .0034099    -5.17   0.000    -.0243125   -.0109459
     lgdpcap |    .026823   .0049967     5.37   0.000     .0170296    .0366164
        lpop |   .0225309   .0041007     5.49   0.000     .0144936    .0305682
   lopenness |   .0130566   .0097361     1.34   0.180    -.0060257    .0321389
        grow |  -.0009801   .0005415    -1.81   0.070    -.0020414    .0000812
incidenc~413 |  -.0028512   .0088781    -0.32   0.748     -.020252    .0145496
meanreserves |  -.0056565   .0024545    -2.30   0.021    -.0104673   -.0008458
ldevelopin~i |   .0096792   .0027054     3.58   0.000     .0043767    .0149817
        asia |  -.0444134   .0166185    -2.67   0.008     -.076985   -.0118418
    americas |  -.0108166   .0122538    -0.88   0.377    -.0348335    .0132003
       easia |   .0274772   .0167266     1.64   0.100    -.0053063    .0602607
         ssa |  -.0491503   .0154911    -3.17   0.002    -.0795123   -.0187883
       _cons |   -.602968   .0866514    -6.96   0.000    -.7728016   -.4331344
-------------+----------------------------------------------------------------
      rho_ar |  .02285817   (estimated autocorrelation coefficient)
     sigma_u |  .02274498
     sigma_e |  .11927128
     rho_fov |  .03509022   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file temp.dta saved
(note: variable im was str13, now str14 to accommodate using data's values)
file coefs.dta cannot be modified or erased; likely cause is read-only
    directory or file
r(608);

end of do-file
r(608);

end of do-file

r(608);

. do "C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final Submis
> sion\Replication Files\industry-level\savecoefs-industry.do"

. clear

. 
. * set working directory
. 
. use IndustryLevelFDI.dta, clear

. *****************************************************************************
> ***
. *************************** Imputed Data ************************************
> ***
. *****************************************************************************
> ***
. #delimit ;
delimiter now ;
. global covars="gwf_personal allexp gtime lgdpcap lpop lopenness grow 
> incidencev413 meanreserves ldevelopingfdi asia americas easia ssa";

.  #delimit cr
delimiter now cr
. 
. set more off

. ****
. ! dir Industry*.csv /a-d /b > filelist.txt

. 
. * command started with "file"* execute lines 19-42 together
. file open myfile using "filelist.txt", read
file handle myfile already exists
r(110);

end of do-file

r(110);

. do "C:\Users\jgw12\AppData\Local\Temp\STD348c_000000.tmp"

. *****************************************************************************
> ***
. ************************ Non-Imputed Data************************************
> ***
. *****************************************************************************
> ***
. use IndustryLevelFDI.dta, clear

. xtset cowcode year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1980 to 2010, but with a gap
                delta:  1 unit

. 
. local replace "replace" 

. foreach var of varlist cub_*_gdp {
  2.  xtregar `var'  $covars, re
  3.  regsave gwf_personal using coefs_nonimputed.dta, ci level(95) `replace'
  4.  local replace "append"
  5.  }

RE GLS regression with AR(1) disturbances       Number of obs     =        915
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.0012                                         min =          1
     between = 0.1970                                         avg =       15.3
     overall = 0.0910                                         max =         31

                                                Wald chi2(15)     =      16.39
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.3566

------------------- theta --------------------
  min      5%       median        95%      max
0.1280   0.3234     0.5164     0.5915   0.5915

------------------------------------------------------------------------------
cub_ISICAg~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0132788   .0250977     0.53   0.597    -.0359118    .0624694
      allexp |   .0015754   .0108286     0.15   0.884    -.0196482     .022799
       gtime |   .0050349     .00638     0.79   0.430    -.0074698    .0175396
     lgdpcap |  -.0133971   .0113343    -1.18   0.237    -.0356118    .0088177
        lpop |   .0050447   .0094198     0.54   0.592    -.0134177    .0235071
   lopenness |   .0086684   .0221243     0.39   0.695    -.0346944    .0520311
        grow |  -.0002791    .000883    -0.32   0.752    -.0020097    .0014516
incidenc~413 |   -.003867    .016141    -0.24   0.811    -.0355027    .0277688
meanreserves |  -.0119678   .0056908    -2.10   0.035    -.0231215   -.0008141
ldevelopin~i |   -.004389   .0061175    -0.72   0.473    -.0163792    .0076012
        asia |  -.0581753   .0382375    -1.52   0.128    -.1331195     .016769
    americas |   .0450419   .0294142     1.53   0.126    -.0126088    .1026927
       easia |   .0092798   .0414886     0.22   0.823    -.0720363     .090596
         ssa |  -.0135107   .0385122    -0.35   0.726    -.0889932    .0619717
       _cons |   .1185757   .2027365     0.58   0.559    -.2787805    .5159319
-------------+----------------------------------------------------------------
      rho_ar |  .33809421   (estimated autocorrelation coefficient)
     sigma_u |  .06379435
     sigma_e |  .10695348
     rho_fov |  .26241408   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        917
Group variable: cowcode                         Number of groups  =         60

R-sq:                                           Obs per group:
     within  = 0.0596                                         min =          1
     between = 0.2603                                         avg =       15.3
     overall = 0.2042                                         max =         31

                                                Wald chi2(15)     =      73.69
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2603   0.5039     0.6727     0.7296   0.7296

------------------------------------------------------------------------------
cub_ISICMi~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .1383874   .0455065     3.04   0.002     .0491963    .2275784
      allexp |  -.0520448   .0172693    -3.01   0.003    -.0858919   -.0181976
       gtime |   .0425713    .010754     3.96   0.000     .0214938    .0636487
     lgdpcap |  -.0703959   .0243246    -2.89   0.004    -.1180713   -.0227205
        lpop |   .0022789   .0201365     0.11   0.910     -.037188    .0417458
   lopenness |   .0248434   .0393768     0.63   0.528    -.0523338    .1020206
        grow |   .0047596   .0014006     3.40   0.001     .0020144    .0075047
incidenc~413 |  -.0137989    .026883    -0.51   0.608    -.0664885    .0388908
meanreserves |   .0444379   .0130917     3.39   0.001     .0187786    .0700971
ldevelopin~i |   .0209007   .0106164     1.97   0.049     .0000929    .0417085
        asia |  -.0789495   .0872043    -0.91   0.365    -.2498667    .0919678
    americas |   .0738354    .066748     1.11   0.269    -.0569883    .2046591
       easia |    .012616   .0926369     0.14   0.892     -.168949    .1941811
         ssa |   .1193381   .0870437     1.37   0.170    -.0512643    .2899406
       _cons |   .1101619   .4069748     0.27   0.787    -.6874941    .9078179
-------------+----------------------------------------------------------------
      rho_ar |  .35396868   (estimated autocorrelation coefficient)
     sigma_u |  .16442198
     sigma_e |  .16900821
     rho_fov |  .48624789   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        443
Group variable: cowcode                         Number of groups  =         39

R-sq:                                           Obs per group:
     within  = 0.0052                                         min =          1
     between = 0.3841                                         avg =       11.4
     overall = 0.1415                                         max =         31

                                                Wald chi2(15)     =      24.73
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0537

------------------- theta --------------------
  min      5%       median        95%      max
0.0794   0.1883     0.4097     0.5317   0.5317

------------------------------------------------------------------------------
cub_ISICFo~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0138471   .0282144     0.49   0.624    -.0414521    .0691463
      allexp |   -.015832   .0129368    -1.22   0.221    -.0411877    .0095238
       gtime |  -.0028681   .0079065    -0.36   0.717    -.0183645    .0126284
     lgdpcap |  -.0056892    .012897    -0.44   0.659    -.0309668    .0195884
        lpop |   .0214763   .0104869     2.05   0.041     .0009223    .0420302
   lopenness |   .0346139   .0289369     1.20   0.232    -.0221015    .0913293
        grow |   .0003523   .0013068     0.27   0.787     -.002209    .0029135
incidenc~413 |  -.0043042   .0207954    -0.21   0.836    -.0450623     .036454
meanreserves |  -.0125217   .0059151    -2.12   0.034     -.024115   -.0009283
ldevelopin~i |   .0033636   .0081763     0.41   0.681    -.0126616    .0193888
        asia |  -.1043481   .0374577    -2.79   0.005    -.1777638   -.0309324
    americas |  -.0076336   .0351927    -0.22   0.828    -.0766101    .0613429
       easia |  -.0546011   .0501768    -1.09   0.277    -.1529459    .0437437
         ssa |  -.1557931   .0452745    -3.44   0.001    -.2445296   -.0670566
       _cons |  -.2853326   .2386508    -1.20   0.232    -.7530796    .1824143
-------------+----------------------------------------------------------------
      rho_ar |  .23004455   (estimated autocorrelation coefficient)
     sigma_u |  .04960427
     sigma_e |  .11379024
     rho_fov |  .15968687   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        431
Group variable: cowcode                         Number of groups  =         39

R-sq:                                           Obs per group:
     within  = 0.0255                                         min =          1
     between = 0.4998                                         avg =       11.1
     overall = 0.3777                                         max =         31

                                                Wald chi2(15)     =      55.18
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2011   0.3892     0.6256     0.7194   0.7194

------------------------------------------------------------------------------
cub_ISICTe~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0495565   .0206054    -2.41   0.016    -.0899424   -.0091706
      allexp |   .0130167   .0082931     1.57   0.117    -.0032376     .029271
       gtime |   .0052427   .0053316     0.98   0.325     -.005207    .0156924
     lgdpcap |  -.0192871   .0111237    -1.73   0.083    -.0410892    .0025149
        lpop |   .0089197   .0085958     1.04   0.299    -.0079277    .0257671
   lopenness |    .015573   .0211617     0.74   0.462    -.0259032    .0570493
        grow |   .0002148   .0008298     0.26   0.796    -.0014116    .0018413
incidenc~413 |  -.0135801   .0146332    -0.93   0.353    -.0422606    .0151004
meanreserves |  -.0094467    .005247    -1.80   0.072    -.0197307    .0008373
ldevelopin~i |   .0136714   .0056586     2.42   0.016     .0025807    .0247621
        asia |  -.0247606   .0338248    -0.73   0.464    -.0910561    .0415348
    americas |  -.0280095   .0303926    -0.92   0.357    -.0875779    .0315588
       easia |   .0997118   .0458331     2.18   0.030     .0098805    .1895431
         ssa |  -.1011475   .0405224    -2.50   0.013    -.1805701    -.021725
       _cons |  -.1162504   .1904618    -0.61   0.542    -.4895487    .2570479
-------------+----------------------------------------------------------------
      rho_ar |  .20842452   (estimated autocorrelation coefficient)
     sigma_u |  .05543375
     sigma_e |  .07201599
     rho_fov |  .37205777   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        413
Group variable: cowcode                         Number of groups  =         39

R-sq:                                           Obs per group:
     within  = 0.0143                                         min =          1
     between = 0.2628                                         avg =       10.6
     overall = 0.0916                                         max =         31

                                                Wald chi2(15)     =      13.97
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.5279

------------------- theta --------------------
  min      5%       median        95%      max
0.0932   0.1897     0.3928     0.5168   0.5168

------------------------------------------------------------------------------
cub_ISICWo~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0184723   .0205406    -0.90   0.368    -.0587312    .0217866
      allexp |   .0009887   .0087599     0.11   0.910    -.0161804    .0181578
       gtime |  -.0024204   .0057861    -0.42   0.676     -.013761    .0089202
     lgdpcap |  -.0096042   .0096953    -0.99   0.322    -.0286066    .0093983
        lpop |   .0098122    .007828     1.25   0.210    -.0055303    .0251548
   lopenness |   .0378462   .0215489     1.76   0.079    -.0043888    .0800812
        grow |   .0003925   .0008879     0.44   0.658    -.0013477    .0021326
incidenc~413 |   .0136775   .0154605     0.88   0.376    -.0166244    .0439794
meanreserves |   .0025685   .0044239     0.58   0.562    -.0061021     .011239
ldevelopin~i |  -.0003861   .0061706    -0.06   0.950    -.0124803    .0117081
        asia |  -.0289534   .0279815    -1.03   0.301    -.0837961    .0258894
    americas |   .0023558    .026318     0.09   0.929    -.0492264    .0539381
       easia |   .0107317   .0395532     0.27   0.786    -.0667911    .0882544
         ssa |  -.0609541   .0338644    -1.80   0.072    -.1273272     .005419
       _cons |  -.1782799   .1822618    -0.98   0.328    -.5355065    .1789467
-------------+----------------------------------------------------------------
      rho_ar |  .35797502   (estimated autocorrelation coefficient)
     sigma_u |  .03700379
     sigma_e |  .07430185
     rho_fov |  .19873317   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        387
Group variable: cowcode                         Number of groups  =         35

R-sq:                                           Obs per group:
     within  = 0.0044                                         min =          1
     between = 0.4688                                         avg =       11.1
     overall = 0.1804                                         max =         29

                                                Wald chi2(15)     =      33.34
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0042

------------------- theta --------------------
  min      5%       median        95%      max
0.1045   0.2599     0.5086     0.6137   0.6137

------------------------------------------------------------------------------
cub_ISICPu~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |    .008907   .0056153     1.59   0.113    -.0020988    .0199128
      allexp |  -.0034897   .0024336    -1.43   0.152    -.0082596    .0012801
       gtime |   .0001845   .0015597     0.12   0.906    -.0028724    .0032413
     lgdpcap |    .003873   .0026313     1.47   0.141    -.0012842    .0090302
        lpop |   .0107773   .0022326     4.83   0.000     .0064014    .0151532
   lopenness |   .0161763   .0059405     2.72   0.006     .0045331    .0278196
        grow |  -.0001363   .0002578    -0.53   0.597    -.0006417     .000369
incidenc~413 |  -.0037627   .0045055    -0.84   0.404    -.0125934    .0050679
meanreserves |  -.0023712   .0011723    -2.02   0.043    -.0046689   -.0000735
ldevelopin~i |  -.0018417   .0015525    -1.19   0.236    -.0048846    .0012012
        asia |  -.0102007   .0079732    -1.28   0.201    -.0258279    .0054266
    americas |   .0139714   .0071808     1.95   0.052    -.0001026    .0280454
       easia |   -.012416   .0117336    -1.06   0.290    -.0354135    .0105815
         ssa |  -.0020152   .0091292    -0.22   0.825    -.0199081    .0158777
       _cons |  -.2437759   .0518286    -4.70   0.000    -.3453582   -.1421937
-------------+----------------------------------------------------------------
      rho_ar |  .12282377   (estimated autocorrelation coefficient)
     sigma_u |   .0106236
     sigma_e |  .02121484
     rho_fov |  .20048825   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        427
Group variable: cowcode                         Number of groups  =         38

R-sq:                                           Obs per group:
     within  = 0.0197                                         min =          1
     between = 0.1523                                         avg =       11.2
     overall = 0.0516                                         max =         29

                                                Wald chi2(15)     =      16.10
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.3755

------------------- theta --------------------
  min      5%       median        95%      max
0.0783   0.2251     0.4742     0.5833   0.5833

------------------------------------------------------------------------------
cub_ISICCo~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0198631   .0241583    -0.82   0.411    -.0672124    .0274862
      allexp |  -.0090074   .0117576    -0.77   0.444     -.032052    .0140372
       gtime |   .0070519   .0068356     1.03   0.302    -.0063457    .0204495
     lgdpcap |  -.0014325   .0111238    -0.13   0.898    -.0232347    .0203698
        lpop |  -.0017125   .0091699    -0.19   0.852    -.0196852    .0162602
   lopenness |   .0107368   .0249556     0.43   0.667    -.0381753    .0596489
        grow |   .0017286   .0011904     1.45   0.146    -.0006044    .0040617
incidenc~413 |   .0195094   .0185952     1.05   0.294    -.0169365    .0559553
meanreserves |   .0091609   .0051113     1.79   0.073     -.000857    .0191788
ldevelopin~i |   .0041916   .0069131     0.61   0.544    -.0093579     .017741
        asia |  -.0081095   .0326048    -0.25   0.804    -.0720137    .0557947
    americas |  -.0170804   .0309045    -0.55   0.580    -.0776521    .0434914
       easia |   .0275222    .043787     0.63   0.530    -.0582988    .1133432
         ssa |  -.0446047   .0390675    -1.14   0.254    -.1211756    .0319662
       _cons |  -.0426144   .2079931    -0.20   0.838    -.4502734    .3650447
-------------+----------------------------------------------------------------
      rho_ar |  .04262422   (estimated autocorrelation coefficient)
     sigma_u |  .04489516
     sigma_e |   .1065649
     rho_fov |  .15073495   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        441
Group variable: cowcode                         Number of groups  =         39

R-sq:                                           Obs per group:
     within  = 0.0142                                         min =          1
     between = 0.5025                                         avg =       11.3
     overall = 0.2269                                         max =         31

                                                Wald chi2(15)     =      49.99
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0800   0.2187     0.4122     0.5341   0.5341

------------------------------------------------------------------------------
cub_ISICCh~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |  -.0315771   .0233026    -1.36   0.175    -.0772494    .0140951
      allexp |  -.0107126   .0107792    -0.99   0.320    -.0318394    .0104143
       gtime |   .0066961   .0064963     1.03   0.303    -.0060365    .0194286
     lgdpcap |   .0215652   .0106389     2.03   0.043     .0007134    .0424169
        lpop |   .0250055   .0084942     2.94   0.003     .0083572    .0416538
   lopenness |   .0180586      .0238     0.76   0.448    -.0285885    .0647057
        grow |  -.0003433   .0010775    -0.32   0.750    -.0024551    .0017686
incidenc~413 |   .0202146   .0170625     1.18   0.236    -.0132273    .0536566
meanreserves |  -.0026338    .004882    -0.54   0.590    -.0122024    .0069347
ldevelopin~i |   .0002958   .0067082     0.04   0.965     -.012852    .0134436
        asia |  -.0352232   .0309723    -1.14   0.255    -.0959278    .0254813
    americas |  -.0297501    .029184    -1.02   0.308    -.0869496    .0274494
       easia |  -.0270855   .0414129    -0.65   0.513    -.1082534    .0540824
         ssa |  -.0929132   .0373768    -2.49   0.013    -.1661704   -.0196561
       _cons |  -.5213013   .1955641    -2.67   0.008    -.9045998   -.1380028
-------------+----------------------------------------------------------------
      rho_ar |  .22791454   (estimated autocorrelation coefficient)
     sigma_u |  .04091329
     sigma_e |  .09349075
     rho_fov |  .16072885   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        401
Group variable: cowcode                         Number of groups  =         37

R-sq:                                           Obs per group:
     within  = 0.0612                                         min =          1
     between = 0.4686                                         avg =       10.8
     overall = 0.2210                                         max =         29

                                                Wald chi2(15)     =      52.41
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2072   0.3556     0.5803     0.6752   0.6752

------------------------------------------------------------------------------
cub_ISICRu~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0005681   .0114905     0.05   0.961    -.0219529    .0230891
      allexp |   .0019245   .0043794     0.44   0.660    -.0066589     .010508
       gtime |   .0007985   .0029672     0.27   0.788    -.0050172    .0066142
     lgdpcap |   .0170964   .0063318     2.70   0.007     .0046863    .0295065
        lpop |    .020557   .0049514     4.15   0.000     .0108524    .0302617
   lopenness |   .0397982   .0123159     3.23   0.001     .0156594     .063937
        grow |   .0005012   .0004355     1.15   0.250    -.0003524    .0013548
incidenc~413 |   .0055243   .0080785     0.68   0.494    -.0103093    .0213578
meanreserves |  -.0045437   .0029471    -1.54   0.123    -.0103198    .0012324
ldevelopin~i |  -.0000664   .0033098    -0.02   0.984    -.0065536    .0064207
        asia |  -.0334968   .0193219    -1.73   0.083    -.0713671    .0043734
    americas |   .0078395   .0172768     0.45   0.650    -.0260223    .0417013
       easia |   .0076899   .0268778     0.29   0.775    -.0449896    .0603693
         ssa |  -.0112678   .0229451    -0.49   0.623    -.0562393    .0337037
       _cons |   -.592228   .1109983    -5.34   0.000    -.8097807   -.3746753
-------------+----------------------------------------------------------------
      rho_ar |  .36924444   (estimated autocorrelation coefficient)
     sigma_u |  .02958472
     sigma_e |  .03576013
     rho_fov |   .4063317   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        428
Group variable: cowcode                         Number of groups  =         39

R-sq:                                           Obs per group:
     within  = 0.0889                                         min =          1
     between = 0.4021                                         avg =       11.0
     overall = 0.2060                                         max =         29

                                                Wald chi2(15)     =      53.20
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0601   0.1366     0.3226     0.4358   0.4358

------------------------------------------------------------------------------
cub_ISICNo~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0033888    .017488     0.19   0.846    -.0308871    .0376646
      allexp |  -.0084682   .0080666    -1.05   0.294    -.0242785    .0073421
       gtime |   .0048756   .0050741     0.96   0.337    -.0050693    .0148206
     lgdpcap |   .0173538   .0078285     2.22   0.027     .0020103    .0326973
        lpop |   .0176875   .0064557     2.74   0.006     .0050345    .0303405
   lopenness |   .0054505   .0182402     0.30   0.765    -.0302996    .0412006
        grow |    .001317   .0008124     1.62   0.105    -.0002752    .0029093
incidenc~413 |  -.0255936   .0131144    -1.95   0.051    -.0512974    .0001102
meanreserves |    -.00179    .003542    -0.51   0.613    -.0087321    .0051522
ldevelopin~i |   .0105865   .0052392     2.02   0.043     .0003178    .0208551
        asia |  -.0294937    .022433    -1.31   0.189    -.0734616    .0144742
    americas |  -.0239198   .0212922    -1.12   0.261    -.0656518    .0178121
       easia |   -.032652    .029985    -1.09   0.276    -.0914216    .0261176
         ssa |   -.048299   .0271255    -1.78   0.075     -.101464    .0048659
       _cons |  -.5106298   .1521576    -3.36   0.001    -.8088532   -.2124064
-------------+----------------------------------------------------------------
      rho_ar |  .30782184   (estimated autocorrelation coefficient)
     sigma_u |   .0263686
     sigma_e |  .06907422
     rho_fov |  .12719225   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        434
Group variable: cowcode                         Number of groups  =         39

R-sq:                                           Obs per group:
     within  = 0.0230                                         min =          1
     between = 0.6078                                         avg =       11.1
     overall = 0.1827                                         max =         31

                                                Wald chi2(15)     =      70.53
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0000   0.0000     0.0000     0.0000   0.0000

------------------------------------------------------------------------------
cub_ISICMe~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0355935   .0211742     1.68   0.093    -.0059071    .0770941
      allexp |   -.028826   .0126234    -2.28   0.022    -.0535673   -.0040846
       gtime |  -.0131553   .0070566    -1.86   0.062    -.0269861    .0006754
     lgdpcap |   .0333421   .0078312     4.26   0.000     .0179933    .0486909
        lpop |   .0287206   .0074246     3.87   0.000     .0141686    .0432726
   lopenness |   .0216537   .0216506     1.00   0.317    -.0207807     .064088
        grow |  -.0025751   .0013016    -1.98   0.048    -.0051261   -.0000241
incidenc~413 |  -.0063681   .0178901    -0.36   0.722    -.0414321    .0286958
meanreserves |   -.002587   .0036791    -0.70   0.482    -.0097978    .0046239
ldevelopin~i |   .0103673   .0067787     1.53   0.126    -.0029187    .0236534
        asia |  -.0456943   .0230392    -1.98   0.047    -.0908502   -.0005383
    americas |  -.0167138    .023508    -0.71   0.477    -.0627885     .029361
       easia |   .0325159   .0306281     1.06   0.288    -.0275142    .0925459
         ssa |  -.0307188    .028423    -1.08   0.280    -.0864268    .0249892
       _cons |  -.8200833    .175509    -4.67   0.000    -1.164075    -.476092
-------------+----------------------------------------------------------------
      rho_ar |  .16794683   (estimated autocorrelation coefficient)
     sigma_u |          0
     sigma_e |  .11637345
     rho_fov |          0   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        444
Group variable: cowcode                         Number of groups  =         40

R-sq:                                           Obs per group:
     within  = 0.0580                                         min =          1
     between = 0.5644                                         avg =       11.1
     overall = 0.3517                                         max =         31

                                                Wald chi2(15)     =      88.96
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.0301   0.0661     0.1782     0.2742   0.2742

------------------------------------------------------------------------------
cub_ISICMa~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0038682   .0180186     0.21   0.830    -.0314476     .039184
      allexp |  -.0058825   .0084914    -0.69   0.488    -.0225254    .0107604
       gtime |  -.0038666   .0052437    -0.74   0.461     -.014144    .0064108
     lgdpcap |   .0294745   .0075431     3.91   0.000     .0146903    .0442587
        lpop |   .0405161   .0063071     6.42   0.000     .0281545    .0528778
   lopenness |   .0773433    .018322     4.22   0.000     .0414328    .1132538
        grow |   .0018665    .000842     2.22   0.027     .0002162    .0035167
incidenc~413 |  -.0086677   .0132053    -0.66   0.512    -.0345496    .0172143
meanreserves |  -.0070439   .0034453    -2.04   0.041    -.0137966   -.0002911
ldevelopin~i |  -.0093383    .005511    -1.69   0.090    -.0201397    .0014631
        asia |  -.0292095   .0218994    -1.33   0.182    -.0721315    .0137125
    americas |    .033909   .0209152     1.62   0.105     -.007084    .0749019
       easia |  -.0019962   .0288113    -0.07   0.945    -.0584653    .0544728
         ssa |  -.0180624   .0267345    -0.68   0.499     -.070461    .0343363
       _cons |  -1.040627   .1493083    -6.97   0.000    -1.333266   -.7479885
-------------+----------------------------------------------------------------
      rho_ar |  .38669686   (estimated autocorrelation coefficient)
     sigma_u |  .01967666
     sigma_e |  .07231961
     rho_fov |  .06892479   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        434
Group variable: cowcode                         Number of groups  =         37

R-sq:                                           Obs per group:
     within  = 0.0818                                         min =          1
     between = 0.5151                                         avg =       11.7
     overall = 0.3561                                         max =         31

                                                Wald chi2(15)     =      55.88
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.0000

------------------- theta --------------------
  min      5%       median        95%      max
0.2633   0.4335     0.6113     0.7037   0.7037

------------------------------------------------------------------------------
cub_I~la_gdp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0068266   .0193208     0.35   0.724    -.0310415    .0446948
      allexp |  -.0021921    .006785    -0.32   0.747    -.0154904    .0111062
       gtime |   .0043764   .0046205     0.95   0.344    -.0046797    .0134324
     lgdpcap |   .0294656   .0113697     2.59   0.010     .0071814    .0517497
        lpop |   .0438717   .0085156     5.15   0.000     .0271814    .0605619
   lopenness |    .048654   .0194565     2.50   0.012     .0105199    .0867882
        grow |  -.0005801   .0006479    -0.90   0.371    -.0018499    .0006898
incidenc~413 |  -.0086928   .0114324    -0.76   0.447    -.0310998    .0137142
meanreserves |   -.010009   .0054455    -1.84   0.066     -.020682    .0006641
ldevelopin~i |   .0018353   .0054503     0.34   0.736     -.008847    .0125177
        asia |  -.0084769   .0353887    -0.24   0.811    -.0778375    .0608837
    americas |   .0036937   .0313878     0.12   0.906    -.0578252    .0652126
       easia |   .0005676   .0478228     0.01   0.991    -.0931634    .0942987
         ssa |  -.0050374   .0422718    -0.12   0.905    -.0878886    .0778137
       _cons |  -1.106104   .1845321    -5.99   0.000     -1.46778   -.7444273
-------------+----------------------------------------------------------------
      rho_ar |  .45145254   (estimated autocorrelation coefficient)
     sigma_u |  .05694582
     sigma_e |  .05536127
     rho_fov |  .51410633   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta saved

RE GLS regression with AR(1) disturbances       Number of obs     =        377
Group variable: cowcode                         Number of groups  =         35

R-sq:                                           Obs per group:
     within  = 0.0056                                         min =          1
     between = 0.2966                                         avg =       10.8
     overall = 0.0750                                         max =         29

                                                Wald chi2(15)     =      18.42
corr(u_i, Xb)      = 0 (assumed)                Prob > chi2       =     0.2410

------------------- theta --------------------
  min      5%       median        95%      max
0.0145   0.0450     0.1438     0.2241   0.2241

------------------------------------------------------------------------------
cub_ISICPr~p |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
gwf_personal |   .0177489   .0068483     2.59   0.010     .0043265    .0311713
      allexp |  -.0027441   .0036425    -0.75   0.451    -.0098833    .0043951
       gtime |   .0000482   .0021279     0.02   0.982    -.0041224    .0042188
     lgdpcap |  -.0001554    .002569    -0.06   0.952    -.0051905    .0048797
        lpop |    .006008   .0025349     2.37   0.018     .0010396    .0109764
   lopenness |   .0075005   .0069374     1.08   0.280    -.0060965    .0210975
        grow |   .0007532   .0003805     1.98   0.048     7.44e-06     .001499
incidenc~413 |  -.0043856   .0057849    -0.76   0.448    -.0157238    .0069527
meanreserves |  -.0022533   .0011728    -1.92   0.055    -.0045519    .0000454
ldevelopin~i |  -.0017879   .0020166    -0.89   0.375    -.0057403    .0021645
        asia |  -.0174215   .0078258    -2.23   0.026    -.0327598   -.0020832
    americas |  -.0030056    .007364    -0.41   0.683    -.0174388    .0114277
       easia |  -.0224932   .0111418    -2.02   0.044    -.0443307   -.0006558
         ssa |   -.014644   .0087995    -1.66   0.096    -.0318906    .0026026
       _cons |  -.0962576   .0599628    -1.61   0.108    -.2137826    .0212674
-------------+----------------------------------------------------------------
      rho_ar |  .14120927   (estimated autocorrelation coefficient)
     sigma_u |  .00550049
     sigma_e |  .03163554
     rho_fov |  .02934392   (fraction of variance due to u_i)
------------------------------------------------------------------------------
file coefs_nonimputed.dta cannot be modified or erased; likely cause is
    read-only directory or file
r(608);

end of do-file

r(608);

. do "C:\Users\jgw12\AppData\Local\Temp\STD348c_000000.tmp"

.                                 
.                                 
.                         ****************** The END ******************** 
. log close
      name:  <unnamed>
       log:  C:\Users\jgw12\Dropbox\Research\Authoritarianism and FDI\ISQ Final
>  Submission\Replication Files\AuthoritarianFDI.log
  log type:  text
 closed on:  21 Nov 2017, 13:00:43
-------------------------------------------------------------------------------
